Name: sipxproxy Version: 3.6.0 Release: %{buildno} Summary: SIP Proxy Servers License: LGPL Group: Productivity/Telephony/SIP/Servers Vendor: SIPfoundry Packager: SIPfoundry Url: http://www.sipfoundry.org/sipXregistry Source: %name-%version.tar.gz Requires: sipxcommserverlib >= 3.6 Requires: ruby >= 1.8.1 Prefix: %_prefix BuildRoot: %{_tmppath}/%name-%version-root # should match sipXlib.m4:SIPX_UPGRADEDIR %define upgrade_archive_dir %{_localstatedir}/sipxdata/upgrade %define this_archive %{name}-%{version}-%{release}.tgz %define sipxcallresolverdir %{_datadir}/sipxpbx/lib %description Two RFC 3261 compliant SIP proxies: * sipForkingProxy * sipAuthProxy These proxies are used in the sipXpbx project. However they may be used independently from the PBX as stand-alone SIP proxies. They may be used separately or together. The sipXregistry may also be used with the forking proxy. Though it is not necessary. The forking proxy provides service level routing as well as parallel and serial forking. The auth proxy provides AAA services. %package cdr Requires: %name >= %version Requires: ruby >= 1.8.4 Requires: ruby-gems >= 0.8.11 Requires: ruby-gems-actionmailer >= 1.1.5 Requires: ruby-gems-actionpack >= 1.11.2 Requires: ruby-gems-activerecord >= 1.13.2 Requires: ruby-gems-activesupport >= 1.2.5 Requires: ruby-gems-rails >= 1.0.0 Requires: ruby-gems-rake >= 0.7.0 Requires: ruby-postgres >= 0.7.1 Requires: unixODBC-devel >= 2.2 Requires: sipxcommserverlib >= %version Group: Productivity/Telephony/SIP/Servers Vendor: SIPfoundry Summary: CDR (Call Distribution Record) aggregration %description cdr Gather CSE (Call State Events) for one or more proxy servers and generate postgres database records from data. %package devel Requires: %name Group: Development/Libraries Vendor: SIPfoundry Summary: Internal documentation for %name Requires: sipxcommserverlib-devel >= 3.6 %description devel Internal class documentation for the proxy classes %prep %setup -q %build %configure --enable-rpmbuild --enable-cdr --with-distdir=/home/buildbot/sipx/dist cp config.log %name.configlog make %install # makeinstall RPM macro doesn't leverage DESTDIR but instead overrides # libdir, bindir, etc just for make install. This not copesetic w/how # our makefiles are built, they'd rather preserve libdir, and use # DESTDIR when copying/moving/creating files. The approach we're taking # is quite standard, so it's surprising RPM's makeinstall macro is # the way it is. rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %define upgrade_archive_root ${RPM_BUILD_ROOT}%{upgrade_archive_dir} mkdir -p %{upgrade_archive_root} tar --directory ${RPM_BUILD_ROOT} \ -czf %{upgrade_archive_root}/%{this_archive} \ etc %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc CONTRIBUTORS ChangeLog %name.configlog %attr(755,root,root) %{_bindir}/sipproxy.sh %attr(755,root,root) %{_bindir}/sipproxy %attr(755,root,root) %{_bindir}/sipauthproxy.sh %attr(755,root,root) %{_bindir}/sipauthproxy %attr(755,root,root) %{_bindir}/%name-config %attr(755,root,root) %{_bindir}/sipxha-distrib.sh # The configuration directory needs to be writeable because # config files are generated from templates via config.defs %dir %attr(755,sipx,sipx) %{_sysconfdir}/sipxpbx %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/proxy-config.in %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/forwardingrules.xml.in %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/authproxy-config.in %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/authrules.xml.in %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/process.d/sipproxy.process.xml %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/process.d/sipauthproxy.process.xml %{upgrade_archive_dir}/%{this_archive} %{upgrade_archive_dir}/%{name}-previous.tgz %files devel %defattr(644,root,root,755) %doc %{_datadir}/doc/sipx/%name/* %pre sipx-upgrade -p sipxproxy -c %post sipx-upgrade -p sipxproxy -u --bdir %{_bindir} --ddir %{_datadir} --cdir %{_sysconfdir} --sdir %{_localstatedir} %define current_archive %{upgrade_archive_dir}/%{name}-current.tgz %define previous_archive %{upgrade_archive_dir}/%{name}-previous.tgz if [ -f %{current_archive} ]; then mv %{current_archive} %{previous_archive} fi mv %{upgrade_archive_dir}/%{this_archive} %{current_archive} pkg-upgrade --previous %{previous_archive} --current %{current_archive} %files cdr %config(noreplace) %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/callresolver-config.in %config %attr(644,sipx,sipx) %{_sysconfdir}/sipxpbx/cdr/* %dir %attr(755,sipx,sipx) %{_sysconfdir}/sipxpbx/cdr %attr(755,root,root) %{sipxcallresolverdir}/sipxcallresolver-1.0.0.gem %attr(755,root,root) %{_bindir}/sipxcallresolver.sh %post cdr gem install --no-rdoc --local %{sipxcallresolverdir}/sipxcallresolver-*.gem >/dev/null 2>&1 if [ -f %{_sysconfdir}/cron.daily/callresolver_run ]; then rm -f %{_sysconfdir}/cron.daily/callresolver_run fi %preun cdr # prevent uninstalling during an upgrade # see http://www-128.ibm.com/developerworks/library/l-rpm3/ if [ "$1" = "0" ] ; then gem uninstall sipxcallresolver >/dev/null 2>&1 sipxcallresolver.sh --uninstall fi