belle-sip.spec.in 2.28 KB
Newer Older
jehan's avatar
jehan committed
1 2 3
# -*- rpm-spec -*-

## rpmbuild options
4 5 6 7 8 9 10
# These 2 lines are here because we can build the RPM for flexisip, in which
# case we prefix the entire installation so that we don't break compatibility
# with the user's libs.
# To compile with bc prefix, use rpmbuild -ba --with bc [SPEC]
%define                 pkg_name        %{?_with_bc:bc-belle-sip}%{!?_with_bc:belle-sip}
%{?_with_bc: %define    _prefix         /opt/belledonne-communications}
%define                 srtp            %{?_without_srtp:0}%{?!_without_srtp:1}
jehan's avatar
jehan committed
11

12 13 14 15 16 17 18 19
# re-define some directories for older RPMBuild versions which don't. This messes up the doc/ dir
# taken from https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros
%define _datarootdir       %{_prefix}/share
%define _datadir           %{_datarootdir}
%define _docdir            %{_datadir}/doc


Name:           %{pkg_name}
jehan's avatar
jehan committed
20
Version:        @VERSION@
jehan's avatar
jehan committed
21
Release:        %(version=`git describe --tags --abbrev=40 | sed -rn 's/^.*-([0-9]+)-g[a-z0-9]{40}$/\1/p'` && if test -z "$version" ; then echo 0 ; else echo $version ; fi)%{?dist}
jehan's avatar
jehan committed
22 23 24 25 26 27 28 29
Summary:        Linphone sip stack

Group:          Applications/Communications
License:        GPL
URL:            http://www.belle-sip.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: 	%{name}-%{version}.tar.gz
%description
30 31
Belle-sip is an object oriented SIP stack, written in C, used by Linphone.

jehan's avatar
jehan committed
32

33
BuildRequires: antlr3-tool antlr3-C-devel
34

jehan's avatar
jehan committed
35 36 37 38 39 40 41 42 43 44 45 46 47
%package devel
Summary:       Development libraries for belle-sip
Group:         Development/Libraries
Requires:      %{name} = %{version}-%{release}

%description    devel
Libraries and headers required to develop software with belle-sip

%prep
%setup -q

%build
%configure \
48
	--disable-tests --enable-static --docdir=%{_docdir}
jehan's avatar
jehan committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
%__make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


64
%files
jehan's avatar
jehan committed
65
%defattr(-,root,root)
jehan's avatar
jehan committed
66
%doc AUTHORS ChangeLog COPYING NEWS README.md
jehan's avatar
jehan committed
67 68 69 70 71 72 73 74 75 76 77 78 79
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/belle-sip
%{_libdir}/libbellesip.a
%{_libdir}/libbellesip.la
%{_libdir}/libbellesip.so
%{_libdir}/pkgconfig/belle-sip.pc

%changelog
* Mon Aug 19 2013 jehan.monnier <jehan.monnier@linphone.org>
- Initial RPM release.