%define EXCLUDED_MODULES mysql jabber cpl-c avp_radius auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc %define MYSQL_MODULES mysql %define UNIXODBC_MODULES unixodbc %define POSTGRES_MODULES postgres %define JABBER_MODULES jabber %define CPL_MODULES cpl-c %define PA_MODULES pa %define RADIUS_MODULES avp_radius auth_radius group_radius uri_radius %define RADIUS_MOD_PATH modules/avp_radius modules/auth_radius modules/group_radius modules/uri_radius %define dist .fc6 Summary: OpenSER, very fast and flexible SIP Proxy Name: openser Version: 1.1.0 Release: 1%{?dist} Epoch: 1 Packager: Zachary Whitley License: GPL Group: Networking/Daemons Source: http://openser.org/pub/openser/stable/%{name}-%{version}_src.tar.gz Source1: openser.init URL: http://openser.org/ Vendor: openser.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Conflicts: openser-mysql < %{version}, openser-jabber < %{version}, openser-radius < %{version}, openser-cpl < %{version}, openser-unixodbc < %{version}, openser-postgres < %{version}, openser-pa < %{version} BuildPrereq: make flex bison %description OpenSER is a very fast and flexible SIP (RFC3621) proxy server. Written entirely in C, openser can handle thousands calls per second even on low-budget hardware. A C Shell like scripting language provides full control over the server's behaviour. It's modular architecture allows only required functionality to be loaded. Currently the following modules are available: digest authentication, CPL scripts, instant messaging, MySQL and UNIXODBC support, a presence agent, radius authentication, record routing, an SMS gateway, a jabber gateway, a transaction and dialog module, OSP module, statistics support, registrar and user location. %package mysql Summary: MySQL connectivity for OpenSER. Group: System Environment/Daemons Requires: openser = %{version} BuildPrereq: mysql-devel zlib-devel %description mysql The openser-mysql package contains MySQL database connectivity that you need to use digest authentication module or persistent user location entries. %package jabber Summary: sip jabber message translation support for OpenSER. Group: System Environment/Daemons Requires: openser = %{version} BuildPrereq: expat-devel %description jabber The openser-jabber package contains a sip to jabber message translator. %package cpl Summary: CPL interpreter engine for OpenSER. Group: System Environment/Daemons Requires: openser = %{version} # BuildPrereq: libxml2-dev %description cpl The openser-cpl package contains a SIP CPL interpreter engine. %prep %setup %build make all skip_modules="%EXCLUDED_MODULES" cfg-target=/%{_sysconfdir}/openser/ make modules modules="modules/%MYSQL_MODULES" cfg-target=/%{_sysconfdir}/openser/ make modules modules="modules/%JABBER_MODULES" cfg-target=/%{_sysconfdir}/openser/ make modules modules="modules/%CPL_MODULES" cfg-target=/%{_sysconfdir}/openser/ %install rm -rf %{buildroot} make install skip_modules="%EXCLUDED_MODULES" \ basedir=%{buildroot} \ prefix=%{_prefix} \ cfg-prefix=%{buildroot} \ cfg-target=/%{_sysconfdir}/openser/ make install-modules-all modules="modules/%MYSQL_MODULES" \ basedir=%{buildroot} \ prefix=%{_prefix} \ cfg-prefix=%{buildroot} \ cfg-target=/%{_sysconfdir}/openser/ make install-modules-all modules="modules/%JABBER_MODULES" \ basedir=%{buildroot} \ prefix=%{_prefix} \ cfg-prefix=%{buildroot} \ cfg-target=/%{_sysconfdir}/openser/ make install-modules-all modules="modules/%CPL_MODULES" \ basedir=%{buildroot} \ prefix=%{_prefix} \ cfg-prefix=%{buildroot} \ cfg-target=/%{_sysconfdir}/openser/ install -m755 -D %{SOURCE1} %{buildroot}/%{_initrddir}/openser %clean rm -rf %{buildroot} %post /sbin/chkconfig --add openser %preun if [ $1 = 0 ]; then /sbin/service openser stop > /dev/null 2>&1 /sbin/chkconfig --del openser fi %files %defattr(-,root,root) %doc %{_docdir}/openser/* %config(noreplace) %{_sysconfdir}/openser/* %config %{_initrddir}/openser %{_libdir}/openser/modules/* %{_libdir}/openser/openserctl/* %{_sbindir}/* %{_mandir}/man5/* %{_mandir}/man8/* %exclude %{_libdir}/openser/modules/mysql.so %exclude %{_sbindir}/openser_mysql.sh %exclude %{_libdir}/openser/openserctl/openserctl.mysql %exclude %{_docdir}/openser/README.jabber %exclude %{_libdir}/openser/modules/jabber.so %exclude %{_docdir}/openser/README.cpl-c %exclude %{_libdir}/openser/modules/cpl-c.so %files mysql %defattr(-,root,root) %doc %{_docdir}/openser/README.mysql %{_libdir}/openser/modules/mysql.so %{_sbindir}/openser_mysql.sh %{_libdir}/openser/openserctl/openserctl.mysql %files jabber %defattr(-,root,root) %doc %{_docdir}/openser/README.jabber %{_libdir}/openser/modules/jabber.so %files cpl %defattr(-,root,root) %doc %{_docdir}/openser/README.cpl-c %{_libdir}/openser/modules/cpl-c.so %changelog * Thu Nov 16 2006 Zachary Whitley 1.1.0-1 - Changed release from rhel3.0 to fc6 - Changed obsolete Copyright to Lisence - Changed packager to self * Fri Jun 30 2006 Bogdan-Andrei Iancu - version set to 1.1.0 - added packages for pa, postgres and unixodbc - added dialog, lcr, options, path, siptrace, statistics modules * Thu Oct 27 2005 Daniel-Constantin Mierla - version set to 1.0.0 * Wed Jun 08 2005 Daniel-Constantin Mierla - First version of the spec file.