Commit 6f5da259 authored by jehan's avatar jehan

add rpm support

parent e9a1bdac
SUBDIRS=include src tester
EXTRA_DIST = belle-sip.spec
test:
cd tester && $(MAKE) test
rpm:
$(MAKE) dist
TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = belle-sip.pc
\ No newline at end of file
pkgconfig_DATA = belle-sip.pc
Belle-sip rpm can be built applying the following procedure:
centos6.4
***********
*antlr.jar*
Belle sip needs antlr.jar to generate parser code. A prebuilt jar is available from the antlr git and should be manually install using the following command:
git clone -b linphone git://git.linphone.org/antlr
sudo mkdir /usr/local/share/java
sudo cp antlr3/antlr-3.4-complete.jar /usr/local/share/java/antlr.jar
*libantlr3c*
Belle sip uses libantlr3c version 3.2 or above. This dependency cannot be easely met on centos 6.4.
To manually build libantlr3c on a 64 bits system, checkout source code using:
cd antlr3/runtime/C
./configure --disable-shared --enable-64bit --with-pic
make
make install
Now, back to belle-sip
make rpm
# -*- rpm-spec -*-
## rpmbuild options
Name: belle-sip
Version: @VERSION@
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}
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
Belle-sip is an object oriented c written SIP stack used by Linphone.
%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 \
--docdir=%{_docdir}
%__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
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_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.
......@@ -22,7 +22,7 @@ AC_PROG_CXX
AM_PROG_CC_C_O
dnl AC_PROG_CC_C99
LT_INIT(disable-static win32-dll)
LT_INIT(enable-static enable-shared win32-dll)
dnl Workaround for mingw, whose compiler doesn't check in /usr/include ...
case "$target_os" in
......@@ -242,5 +242,6 @@ include/belle-sip/Makefile
src/Makefile
tester/Makefile
belle-sip.pc
belle-sip.spec
])
AC_OUTPUT
......@@ -63,7 +63,7 @@ libbellesip_la_SOURCES= \
transports/tunnel_listeningpoint.c \
transports/tunnel_channel.c \
transports/tunnel_wrapper.cc \
refresher.c refresher-helper.h \
refresher.c \
dns.c dns.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment