rpm/ser.spec
411cf34c
 %define name    ser
75814da6
 %define ver     0.8.11pre29
 %define rel     0
 
31521f89
 %define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius postgress snmp cpl cpl-c ext extcmd mangler pdt
75814da6
 %define MYSQL_MODULES		mysql
 %define JABBER_MODULES		jabber
 %define RADIUS_MODULES		auth_radius group_radius uri_radius
31521f89
 %define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
31aaaa3c
 
 Summary:      SIP Express Router, very fast and flexible SIP Proxy
 Name:         %name
 Version:      %ver
 Release:      %rel
4ef6ff99
 Packager:     Jan Janak <jan@iptel.org>
31aaaa3c
 Copyright:    GPL
82acb9d0
 Group:        System Environment/Daemons
054cb6cf
 Source:       http://iptel.org/ser/stable/%{name}-%{ver}_src.tar.gz
82acb9d0
 Source2:      ser.init
81a0243f
 URL:          http://iptel.org/ser
f0b51d41
 Vendor:       FhG Fokus
31aaaa3c
 BuildRoot:    /var/tmp/%{name}-%{ver}-root
ec12e370
 BuildPrereq:  make flex bison
31aaaa3c
 
 
 %description
 Ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
 proxy server. Written entirely in C, ser can handle thousands calls
a132c70a
 per second even on low-budget hardware. A C Shell like scripting language
31aaaa3c
 provides full control over the server's behaviour. It's modular
 architecture allows only required functionality to be loaded.
a132c70a
 Currently the following modules are available: digest authentication,
 CPL scripts, instant messaging, MySQL support, a presence agent, radius
 authentication, record routing, an SMS gateway, a jabber gateway, a 
 transaction module, registrar and user location.
31aaaa3c
 
411cf34c
 %package  mysql
 Summary:  MySQL connectivity for the SIP Express Router.
 Group:    System Environment/Daemons
 Requires: ser
ec12e370
 BuildPrereq:  mysql-devel zlib-devel
411cf34c
 
 %description mysql
 The ser-mysql package contains MySQL database connectivity that you
 need to use digest authentication module or persistent user location
 entries.
31aaaa3c
 
f321f8eb
 %package  jabber
 Summary:  sip jabber message translation support for the SIP Express Router.
 Group:    System Environment/Daemons
 Requires: ser
 BuildPrereq:  expat-devel
 
 %description jabber
 The ser-jabber package contains a sip to jabber message translator.
 
75814da6
 %package  radius
 Summary:  ser radius authentication, group and uri check modules.
 Group:    System Environment/Daemons
 Requires: ser
31521f89
 BuildPrereq:  radiusclient-devel
75814da6
 
 %description radius
 The ser-radius package contains modules for radius authentication, group
  membership and uri checking.
 
31aaaa3c
 %prep
c2d67552
 %setup
31aaaa3c
 
 %build
75814da6
 make all skip_modules="%EXCLUDED_MODULES"      cfg-target=/%{_sysconfdir}/ser/
 make modules modules="modules/%MYSQL_MODULES"  cfg-target=/%{_sysconfdir}/ser/
 make modules modules="modules/%JABBER_MODULES" cfg-target=/%{_sysconfdir}/ser/
 make modules modules="%RADIUS_MOD_PATH"        cfg-target=/%{_sysconfdir}/ser/
f1b6a00f
 
31aaaa3c
 
 %install
82acb9d0
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
 
75814da6
 make install skip_modules="%EXCLUDED_MODULES" \
 		basedir=$RPM_BUILD_ROOT \
 		prefix=/usr \
31521f89
 		cfg-prefix=$RPM_BUILD_ROOT \
75814da6
 		cfg-target=/%{_sysconfdir}/ser/ 
 make install-modules modules="modules/%MYSQL_MODULES" \
 		basedir=$RPM_BUILD_ROOT \
 		prefix=/usr \
31521f89
 		cfg-prefix=$RPM_BUILD_ROOT \
75814da6
 		cfg-target=/%{_sysconfdir}/ser/ 
 make install-modules modules="modules/%JABBER_MODULES" \
 		basedir=$RPM_BUILD_ROOT \
 		prefix=/usr \
31521f89
 		cfg-prefix=$RPM_BUILD_ROOT \
75814da6
 		cfg-target=/%{_sysconfdir}/ser/ 
 make install-modules modules="%RADIUS_MOD_PATH" \
 		basedir=$RPM_BUILD_ROOT \
 		prefix=/usr \
31521f89
 		cfg-prefix=$RPM_BUILD_ROOT \
75814da6
 		cfg-target=/%{_sysconfdir}/ser/ 
31aaaa3c
 
f1b6a00f
 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
82acb9d0
 install -m755 $RPM_SOURCE_DIR/ser.init \
f1b6a00f
               $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/ser
 
31aaaa3c
 
eb882f9b
 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
 install -m755 scripts/harv_ser.sh \
               $RPM_BUILD_ROOT/%{_bindir}/harv_ser.sh
 
 mv $RPM_BUILD_ROOT/%{_sbindir}/gen_ha1 $RPM_BUILD_ROOT/%{_bindir}
 
 
31aaaa3c
 %clean
82acb9d0
 rm -rf "$RPM_BUILD_ROOT"
 
 %post
 /sbin/chkconfig --add ser
 
 %preun
 if [ $1 = 0 ]; then
     /sbin/service ser stop > /dev/null 2>&1
     /sbin/chkconfig --del ser
 fi
 
31aaaa3c
 
 %files
82acb9d0
 %defattr(-,root,root)
 %doc README
 
 %dir %{_sysconfdir}/ser
 %config(noreplace) %{_sysconfdir}/ser/*
 %config %{_sysconfdir}/rc.d/init.d/*
 
 %dir %{_libdir}/ser
 %dir %{_libdir}/ser/modules
411cf34c
 %{_libdir}/ser/modules/acc.so
 %{_libdir}/ser/modules/auth.so
75814da6
 %{_libdir}/ser/modules/auth_db.so
 %{_libdir}/ser/modules/dbtext.so
 %{_libdir}/ser/modules/domain.so
 %{_libdir}/ser/modules/enum.so
0be750c8
 %{_libdir}/ser/modules/exec.so
75814da6
 %{_libdir}/ser/modules/group.so
411cf34c
 %{_libdir}/ser/modules/maxfwd.so
f321f8eb
 %{_libdir}/ser/modules/msilo.so
75814da6
 %{_libdir}/ser/modules/nathelper.so
 %{_libdir}/ser/modules/pa.so
 %{_libdir}/ser/modules/permissions.so
f321f8eb
 %{_libdir}/ser/modules/pike.so
411cf34c
 %{_libdir}/ser/modules/print.so
 %{_libdir}/ser/modules/registrar.so
 %{_libdir}/ser/modules/rr.so
 %{_libdir}/ser/modules/sl.so
 %{_libdir}/ser/modules/sms.so
 %{_libdir}/ser/modules/textops.so
 %{_libdir}/ser/modules/tm.so
75814da6
 %{_libdir}/ser/modules/uri.so
411cf34c
 %{_libdir}/ser/modules/usrloc.so
75814da6
 %{_libdir}/ser/modules/vm.so
411cf34c
 
 %{_sbindir}/ser
 %{_sbindir}/serctl
eb882f9b
 
 %{_bindir}/harv_ser.sh
 %{_bindir}/gen_ha1
82acb9d0
 
 %{_mandir}/man5/*
 %{_mandir}/man8/*
 
 
411cf34c
 %files mysql
 %defattr(-,root,root)
 
 %{_libdir}/ser/modules/mysql.so
 %{_sbindir}/ser_mysql.sh
 
f321f8eb
 %files jabber
 %defattr(-,root,root)
 
 %{_libdir}/ser/modules/jabber.so
411cf34c
 
75814da6
 %files radius
 %defattr(-,root,root)
 
 %{_libdir}/ser/modules/auth_radius.so
 %{_libdir}/ser/modules/group_radius.so
 %{_libdir}/ser/modules/uri_radius.so
 
 
82acb9d0
 %changelog
75814da6
 
 * Sun Jun 1 2003 Andrei Pelinescu - Onciul <pelinescu-onciul@fokus.fraunhofer.de>
 - added a separate rpm for the radius modules
 - updated to the new makefile variables (removed lots of unnecessary stuff)
 
eb882f9b
 * Thu Nov 14 2002 Jan Janak <J.Janak@sh.cvut.cz>
 - Installing harv_ser.sh again
 - quick hack to move gen_ha1 to bin directory instead of sbin (should
   be done from the Makefile next time)
 
f321f8eb
 * Tue Nov 12 2002 Andrei Pelinescu - Onciul <pelinescu-onciul@fokus.gmd.de>
 - added a separate rpm for the jabber modules
 - moved all the binaries to sbin
 - removed obsolete installs (make install installs everything now)
 
a132c70a
 * Fri Oct 25 2002 Jan Janak <J.Janak@sh.cvut.cz>
 - Minor description fixes
 
c6930bb8
 * Fri Oct  4 2002 Jiri Kuthan <jiri@iptel.org>
0be750c8
 - exec module introduced
 
054cb6cf
 * Wed Sep 25 2002 Andrei Pelinescu - Onciul  <pelinescu-onciul@fokus.gmd.de>
 - modified make install & make: added cfg-target & modules-target
 
411cf34c
 * Sun Sep 08 2002 Jan Janak <J.Janak@sh.cvut.cz>
2c053a10
 - Created subpackage containing mysql connectivity support.
411cf34c
 
f1b6a00f
 * Mon Sep 02 2002 Jan Janak <J.Janak@sh.cvut.cz>
 - gen_ha1 utility added, scripts added.
 
82acb9d0
 * Tue Aug 28 2002 Jan Janak <J.Janak@sh.cvut.cz>
 - Finished the first version of the spec file.
 
 * Sun Aug 12 2002 Jan Janak <J.Janak@sh.cvut.cz>
 - First version of the spec file.