2b25416
Name: resiprocate
2b25416
Version: 1.8.7
2b25416
Release: 1%{?dist}
2b25416
Summary: SIP and TURN stacks, with SIP proxy and TURN server implementations
2b25416
License: VSL
2b25416
Url: http://www.resiprocate.org
2b25416
Source: https://www.resiprocate.org/files/pub/reSIProcate/releases/%name-%version.tar.gz
2b25416
BuildRequires: libtool automake autoconf
2b25416
BuildRequires: asio-devel
2b25416
BuildRequires: boost-devel
2b25416
BuildRequires: c-ares-devel
2b25416
BuildRequires: cppunit-devel
2b25416
BuildRequires: gperf
2b25416
BuildRequires: db4-cxx-devel
2b25416
BuildRequires: db4-devel
2b25416
BuildRequires: openssl-devel >= 0.9.8
2b25416
BuildRequires: mysql-devel
2b25416
BuildRequires: pcre-devel
2b25416
BuildRequires: perl
2b25416
BuildRequires: popt-devel
2b25416
BuildRequires: radiusclient-ng-devel
2b25416
BuildRequires: xerces-c-devel
2b25416
Requires: openssl >= 0.9.8
2b25416
Requires: chkconfig
2b25416
2b25416
%description
2b25416
The reSIProcate components, particularly the SIP stack, are in use in both
2b25416
commercial and open-source products. The project is dedicated to maintaining
2b25416
a complete, correct, and commercially usable implementation of SIP and a few
2b25416
related protocols.
2b25416
2b25416
%package libs
2b25416
Summary: Shared libraries http://www.resiprocate.org
2b25416
2b25416
%description libs
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
This package provides the core libraries: librutil (utilities),
2b25416
libresip (SIP stack/RFC compliant message parsing) and
2b25416
libdum (SIP Dialog Usage Manager, a state machine for SIP dialogs).
2b25416
2b25416
%package devel
2b25416
Summary: reSIProcate development files
2b25416
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
2b25416
2b25416
%description devel
2b25416
Resiprocate SIP Stack development files.
2b25416
2b25416
%package repro
2b25416
Summary: SIP proxy
2b25416
Requires(pre): shadow-utils
2b25416
2b25416
%description repro
2b25416
repro is the SIP proxy developed as part of the reSIProcate project.
2b25416
It provides a high-quality, low maintenance solution for serving
2b25416
small and large IP telephony installations.
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
2b25416
%package turn-server
2b25416
Summary: ICE/STUN/TURN server
2b25416
Requires(pre): shadow-utils
2b25416
2b25416
%description turn-server
2b25416
reTurn is the TURN server developed as part of the reSIProcate project.
2b25416
TURN (RFC 5766) provides a standardised solution for VoIP applications
2b25416
to find the most efficient way to route media streams when NAT and
2b25416
firewall devices may be present.
2b25416
reTurn provides a high-quality, low maintenance solution for serving
2b25416
small and large IP telephony installations.  It has been used successfully
2b25416
with a variety of SIP and Jabber applications, including Lumicall,
2b25416
Jitsi, Empathy and Psi.
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
2b25416
%package sipdialer
2b25416
Summary: Click-to-call utility
2b25416
2b25416
%description sipdialer
2b25416
sipdialer is a click-to-call application that uses the SIP REFER
2b25416
method to force a SIP phone (for example, the phone on your desk)
2b25416
to dial another number.  It can be registered in GConf to handle
2b25416
clicks on sip:, sips: and tel: URIs in other applications and the
2b25416
web browser.
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
2b25416
%package b2bua
2b25416
Summary: Basic SIP B2BUA
2b25416
2b25416
%description b2bua
2b25416
Provides a simple SIP B2BUA configured from a static XML file.
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
2b25416
%package clicktocall
2b25416
Summary: Click-to-call server process
2b25416
2b25416
%description clicktocall
2b25416
Provides a simple SIP click-to-call service.
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
2b25416
%package presence-server
2b25416
Summary: Basic SIP presence server
2b25416
2b25416
%description presence-server
2b25416
Provides a simple SIP presence server.
2b25416
reSIProcate is a framework that aims to fully implement the SIP protocol
2b25416
in first class C++.  It is intended for use in other applications,
2b25416
such as the repro SIP proxy.
2b25416
2b25416
%prep
2b25416
%setup -q
2b25416
2b25416
%build
2b25416
CXXFLAGS="%{optflags} -I%{_includedir}/libdb4" LDFLAGS="-L%{_libdir}/mysql -L%{_libdir}/libdb4" %configure --with-c-ares --with-ssl --with-mysql --with-radius --with-b2bua --with-apps --enable-ipv6
2b25416
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
2b25416
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
2b25416
make %{?_smp_mflags}
2b25416
2b25416
%install
2b25416
make DESTDIR=%{buildroot} install
2b25416
install -p -D -m644 repro/pkg/fedora/repro.service %{buildroot}%{_unitdir}/repro.service
2b25416
install -p -D -m644 reTurn/pkg/fedora/resiprocate-turn-server.service %{buildroot}%{_unitdir}/resiprocate-turn-server.service
2b25416
install -m 0755 -d %{buildroot}%{_sysconfdir}/repro
2b25416
install -p -D -m644 repro/repro.config %{buildroot}%{_sysconfdir}/repro/repro.config
2b25416
sed -i -e 's!^DatabasePath = ./$!DatabasePath = %{_localstatedir}/lib/repro!' %{buildroot}%{_sysconfdir}/repro/repro.config
2b25416
install -p -D -m644 reTurn/reTurnServer.config %{buildroot}%{_sysconfdir}/reTurnServer.config
2b25416
install -m 0755 -d %{buildroot}%{_localstatedir}/lib/repro
2b25416
rm -f %{buildroot}%{_libdir}/lib*.a
2b25416
rm -f %{buildroot}%{_libdir}/lib*.la
2b25416
2b25416
%pre repro
2b25416
getent group repro >/dev/null || groupadd -r repro
2b25416
getent passwd repro >/dev/null || \
2b25416
    useradd -r -g repro -d %{_localstatedir}/lib/repro -s /sbin/nologin \
2b25416
    -c "repro SIP proxy" repro
2b25416
2b25416
%pre turn-server
2b25416
getent group return >/dev/null || groupadd -r return
2b25416
getent passwd return >/dev/null || \
2b25416
    useradd -r -g return -d / -s /sbin/nologin \
2b25416
    -c "reTurn TURN server" return
2b25416
2b25416
%post libs -p /sbin/ldconfig
2b25416
2b25416
%post repro
2b25416
/sbin/ldconfig
2b25416
if [ $1 -eq 1 ] ; then
2b25416
    # Initial installation
2b25416
    /bin/systemctl enable repro.service >/dev/null 2>&1 || :
2b25416
fi
2b25416
2b25416
%post turn-server
2b25416
if [ $1 -eq 1 ] ; then
2b25416
    # Initial installation
2b25416
    /bin/systemctl enable resiprocate-turn-server.service >/dev/null 2>&1 || :
2b25416
fi
2b25416
2b25416
%preun repro
2b25416
if [ "$1" = 0 ]
2b25416
then
2b25416
   # Package removal, not upgrade
2b25416
   /bin/systemctl --no-reload disable repro.service > /dev/null 2>&1 || :
2b25416
   /bin/systemctl stop repro.service > /dev/null 2>&1 || :
2b25416
fi
2b25416
2b25416
%preun turn-server
2b25416
if [ "$1" = 0 ]
2b25416
then
2b25416
   # Package removal, not upgrade
2b25416
   /bin/systemctl --no-reload disable resiprocate-turn-server.service > /dev/null 2>&1 || :
2b25416
   /bin/systemctl stop resiprocate-turn-server.service > /dev/null 2>&1 || :
2b25416
fi
2b25416
2b25416
%postun libs -p /sbin/ldconfig
2b25416
2b25416
%postun repro
2b25416
/sbin/ldconfig
2b25416
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
2b25416
if [ $1 -ge 1 ] ; then
2b25416
    # Package upgrade, not uninstall
2b25416
    /bin/systemctl try-restart repro.service >/dev/null 2>&1 || :
2b25416
fi
2b25416
2b25416
%postun turn-server
2b25416
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
2b25416
if [ $1 -ge 1 ] ; then
2b25416
    # Package upgrade, not uninstall
2b25416
    /bin/systemctl try-restart resiprocate-turn-server.service >/dev/null 2>&1 || :
2b25416
fi
2b25416
2b25416
%files libs
2b25416
%doc COPYING
2b25416
%{_libdir}/libb2bua-*.so
2b25416
%{_libdir}/libdum-*.so
2b25416
%{_libdir}/librepro-*.so
2b25416
%{_libdir}/libresip-*.so
2b25416
%{_libdir}/libreTurnClient-*.so
2b25416
%{_libdir}/librutil-*.so
2b25416
%{_libdir}/libsipdial-*.so
2b25416
2b25416
%files devel
2b25416
%dir %{_includedir}/b2bua/
2b25416
%dir %{_includedir}/clicktocall/
2b25416
%dir %{_includedir}/reTurnClient/
2b25416
%dir %{_includedir}/repro/
2b25416
%dir %{_includedir}/repro/monkeys/
2b25416
%dir %{_includedir}/repro/stateAgents/
2b25416
%dir %{_includedir}/resip/
2b25416
%dir %{_includedir}/resip/dum/
2b25416
%dir %{_includedir}/resip/dum/ssl/
2b25416
%dir %{_includedir}/resip/stack/
2b25416
%dir %{_includedir}/resip/stack/ssl/
2b25416
%dir %{_includedir}/rutil/
2b25416
%dir %{_includedir}/rutil/dns/
2b25416
%dir %{_includedir}/rutil/ssl/
2b25416
%dir %{_includedir}/rutil/stun/
2b25416
%dir %{_includedir}/rutil/wince/
2b25416
%dir %{_includedir}/sipdial/
2b25416
%{_includedir}/b2bua/*.hxx
2b25416
%{_includedir}/clicktocall/*.hxx
2b25416
%{_includedir}/reTurnClient/*.hxx
2b25416
%{_includedir}/repro/*.hxx
2b25416
%{_includedir}/repro/*/*.hxx
2b25416
%{_includedir}/resip/dum/*.hxx
2b25416
%{_includedir}/resip/dum/ssl/*.hxx
2b25416
%{_includedir}/resip/stack/*.hxx
2b25416
%{_includedir}/resip/stack/ssl/*.hxx
2b25416
%{_includedir}/rutil/*.hxx
2b25416
%{_includedir}/rutil/*/*.hxx
2b25416
%{_includedir}/sipdial/*.hxx
2b25416
%{_libdir}/libb2bua.so
2b25416
%{_libdir}/libdum.so
2b25416
%{_libdir}/librepro.so
2b25416
%{_libdir}/libresip.so
2b25416
%{_libdir}/libreTurnClient.so
2b25416
%{_libdir}/librutil.so
2b25416
%{_libdir}/libsipdial.so
2b25416
2b25416
%files repro
2b25416
%attr(0755,repro,repro) %dir %{_localstatedir}/lib/repro
2b25416
%config(noreplace) %{_sysconfdir}/repro/repro.config
2b25416
%{_unitdir}/repro.service
2b25416
%{_sbindir}/repro
2b25416
%{_sbindir}/reprocmd
2b25416
%{_mandir}/man8/repro*.8*
2b25416
2b25416
%files turn-server
2b25416
%config(noreplace) %{_sysconfdir}/reTurnServer.config
2b25416
%{_unitdir}/resiprocate-turn-server.service
2b25416
%{_sbindir}/reTurnServer
2b25416
%{_mandir}/man8/reTurnServer.8*
2b25416
2b25416
%files sipdialer
2b25416
%{_bindir}/sipdialer
2b25416
%{_mandir}/man1/sipdialer.1*
2b25416
2b25416
%files clicktocall
2b25416
%{_sbindir}/clicktocall
2b25416
2b25416
%files b2bua
2b25416
%{_bindir}/basicB2BUA
2b25416
2b25416
%files presence-server
2b25416
%{_sbindir}/presSvr
2b25416
2b25416
%changelog
2b25416
* Sat Nov 24 2012 Daniel Pocock <daniel@pocock.com.au> - 1.8.7-1
2b25416
- Produce multiple packages for stack/libs, daemons, sipdialer
2b25416
- Initial build based on autotools
2b25416