Selaa lähdekoodia

- opensuse/suse packaging stuff

Jan Janak 19 vuotta sitten
vanhempi
commit
4ec8623f64
4 muutettua tiedostoa jossa 470 lisäystä ja 0 poistoa
  1. 136 0
      pkg/opensuse/ser.init.SuSE
  2. 334 0
      pkg/opensuse/ser.spec
  3. 0 0
      pkg/suse/ser.init
  4. 0 0
      pkg/suse/ser.spec

+ 136 - 0
pkg/opensuse/ser.init.SuSE

@@ -0,0 +1,136 @@
+#! /bin/sh
+# Copyright (c) 2002 Frauenhofer Gesellschaft FOKUS, Germany.
+# All rights reserved.
+#
+# Author: Nils Ohlmeier <[email protected]>
+#
+# /etc/init.d/ser
+#
+### BEGIN INIT INFO
+# Provides:          sip
+# Required-Start:    $network
+# X-UnitedLinux-Should-Start: $network
+# Required-Stop:     $network
+# X-UnitedLinux-Should-Stop: $network
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: SIP Express Router
+# Description:       Start SER and provide the routing of SIP requests.
+### END INIT INFO
+
+
+# Check for missing binaries (stale symlinks should not happen)
+SER_BIN=/usr/sbin/ser
+test -x $SER_BIN || exit 5
+
+# Check for existence of needed config file and read it
+SER_CONFIG=/etc/ser/ser.cfg
+test -r $SER_CONFIG || exit 6
+#. $SER_CONFIG
+
+# Shell functions sourced from /etc/rc.status:
+#      rc_check         check and set local and overall rc status
+#      rc_status        check and set local and overall rc status
+#      rc_status -v     ditto but be verbose in local rc status
+#      rc_status -v -r  ditto and clear the local rc status
+#      rc_status -s     display "skipped" and exit with status 3
+#      rc_status -u     display "unused" and exit with status 3
+#      rc_failed        set local and overall rc status to failed
+#      rc_failed <num>  set local and overall rc status to <num>
+#      rc_reset         clear local rc status (overall remains)
+#      rc_exit          exit appropriate to overall rc status
+#      rc_active	checks whether a service is activated by symlinks
+#      rc_splash arg    sets the boot splash screen to arg (if active)
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0	  - success
+# 1       - generic or unspecified error
+# 2       - invalid or excess argument(s)
+# 3       - unimplemented feature (e.g. "reload")
+# 4       - user had insufficient privileges
+# 5       - program is not installed
+# 6       - program is not configured
+# 7       - program is not running
+# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+# 
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+case "$1" in
+    start)
+	echo -n "Starting SIP Express Router "
+	## Start daemon with startproc(8). If this fails
+	## the return value is set appropriately by startproc.
+	startproc $SER_BIN -f $SER_CONFIG
+
+	# Remember status and be verbose
+	rc_status -v
+	;;
+    stop)
+	echo -n "Shutting down SIP Express Router "
+	## Stop daemon with killproc(8) and if this fails
+	## killproc sets the return value according to LSB.
+
+	killproc -TERM $SER_BIN
+
+	# Remember status and be verbose
+	rc_status -v
+	;;
+    restart)
+	## Stop the service and regardless of whether it was
+	## running or not, start it again.
+	$0 stop
+	$0 start
+
+	# Remember status and be quiet
+	rc_status
+	;;
+    force-reload)
+	## Signal the daemon to reload its config. Most daemons
+	## do this on signal 1 (SIGHUP).
+	## If it does not support it, restart.
+
+	echo -n "Reload service SIP Express Router "
+	## Otherwise:
+	$0 stop  &&  $0 start
+	rc_status
+	;;
+    reload)
+	## Like force-reload, but if daemon does not support
+	## signaling, do nothing (!)
+
+	## Otherwise if it does not support reload:
+	rc_failed 3
+	rc_status -v
+	;;
+    status)
+	echo -n "Checking for service SIP Express Router "
+	## Check status with checkproc(8), if process is running
+	## checkproc will return with exit status 0.
+
+	# Return value is slightly different for the status command:
+	# 0 - service up and running
+	# 1 - service dead, but /var/run/  pid  file exists
+	# 2 - service dead, but /var/lock/ lock file exists
+	# 3 - service not running (unused)
+	# 4 - service status unknown :-(
+	# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
+	
+	# NOTE: checkproc returns LSB compliant status values.
+	checkproc $SER_BIN
+	# NOTE: rc_status knows that we called this init script with
+	# "status" option and adapts its messages accordingly.
+	rc_status -v
+	;;
+    *)
+	echo "Usage: $0 {start|stop|status|restart}"
+	exit 1
+	;;
+esac
+rc_exit

+ 334 - 0
pkg/opensuse/ser.spec

@@ -0,0 +1,334 @@
+%define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius postgres snmp cpl cpl-c extcmd 
+%define MYSQL_MODULES		mysql
+%define JABBER_MODULES		jabber
+%define RADIUS_MODULES		auth_radius group_radius uri_radius
+%define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
+
+
+Summary:      SIP Express Router, very fast and flexible SIP Proxy
+Name:         ser
+Version:      0.9.6
+Release:      22.1
+Packager:     Peter Nixon <[email protected]>
+License:      GPL
+Group:        Productivity/Telephony/SIP/Servers
+Source:       http://iptel.org/ser/stable/%{name}-%{version}_src.tar.bz2
+Source2:      ser.init.SuSE
+%ifarch x86_64
+Patch:        Makefile.defs.patch
+%endif
+URL:          http://www.iptel.org/ser
+Vendor:       FhG Fokus
+BuildRoot:    /var/tmp/%{name}-%{version}-root
+Conflicts:    ser < %{version}, ser-mysql < %{version}, ser-jabber < %{version}, ser-radius < %{version}
+BuildPrereq:  make flex bison 
+BuildRequires: mysql-devel, radiusclient, expat
+
+%description
+SIP Express Router (SER) is a very fast and flexible SIP (RFC3621)
+proxy server. Written entirely in C, SER 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 support, a presence agent, radius
+authentication, record routing, an SMS Gateway, a jabber gateway, a 
+transaction module, registrar and user location.
+
+%package  mysql
+Summary:  MySQL connectivity for the SIP Express Router.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq: mysql-devel zlib-devel
+
+%description mysql
+The ser-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 the SIP Express Router.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq: expat
+
+%description jabber
+The ser-jabber package contains a sip to jabber message translator.
+
+%package  radius
+Summary:  ser radius authentication, group and uri check modules.
+Group:    Productivity/Telephony/SIP/Servers
+Requires: ser = %{version}
+BuildPrereq:  radiusclient
+
+%description radius
+The ser-radius package contains modules for radius authentication, group
+ membership and uri checking.
+
+%prep
+%setup
+%ifarch x86_64
+%patch
+%endif
+
+%build
+make all skip_modules="%EXCLUDED_MODULES" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%MYSQL_MODULES" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+make modules modules="modules/%JABBER_MODULES" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+make modules modules="%RADIUS_MOD_PATH" \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-target=/%{_sysconfdir}/ser/
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+make install skip_modules="%EXCLUDED_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="modules/%MYSQL_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="modules/%JABBER_MODULES" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-modules modules="%RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		cfg-prefix=$RPM_BUILD_ROOT \
+		cfg-target=/%{_sysconfdir}/ser/ \
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+make install-doc modules="modules/%JABBER_MODULES %RADIUS_MOD_PATH" \
+		basedir=$RPM_BUILD_ROOT \
+		prefix=/usr \
+%ifarch x86_64
+		modules-dir=/lib64/ser/modules/ \
+%endif
+		doc-prefix=$RPM_BUILD_ROOT \
+		doc-dir=/%{_docdir}/ser/
+
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/init.d
+install -m755 $RPM_SOURCE_DIR/ser.init.SuSE \
+              $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ser
+ln -sf ../../etc/init.d/ser $RPM_BUILD_ROOT/usr/sbin/rcser
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+%post
+sbin/insserv etc/init.d/ser
+
+%preun
+if [ $1 = 0 ]; then
+    etc/init.d/ser stop > /dev/null 2>&1
+fi
+
+%postun
+sbin/insserv etc/init.d/
+
+%files
+%defattr(-,root,root)
+%dir %{_docdir}/ser
+%doc %{_docdir}/ser/*
+
+%dir %{_sysconfdir}/ser
+%config(noreplace) %{_sysconfdir}/ser/*
+%config %{_sysconfdir}/init.d/*
+
+#%ifarch x86_64
+#%else
+%dir %{_libdir}/ser
+%dir %{_libdir}/ser/modules
+%{_libdir}/ser/modules/acc.so
+%{_libdir}/ser/modules/auth.so
+%{_libdir}/ser/modules/auth_db.so
+%{_libdir}/ser/modules/auth_diameter.so
+%{_libdir}/ser/modules/dbtext.so
+%{_libdir}/ser/modules/domain.so
+%{_libdir}/ser/modules/enum.so
+%{_libdir}/ser/modules/exec.so
+%{_libdir}/ser/modules/group.so
+%{_libdir}/ser/modules/mangler.so
+%{_libdir}/ser/modules/maxfwd.so
+%{_libdir}/ser/modules/mediaproxy.so
+%{_libdir}/ser/modules/msilo.so
+%{_libdir}/ser/modules/nathelper.so
+%{_libdir}/ser/modules/pdt.so
+%{_libdir}/ser/modules/permissions.so
+%{_libdir}/ser/modules/pike.so
+%{_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
+%{_libdir}/ser/modules/uri.so
+%{_libdir}/ser/modules/usrloc.so
+%{_libdir}/ser/modules/xlog.so
+
+%{_libdir}/ser/modules/avp.so
+%{_libdir}/ser/modules/avp_db.so
+%{_libdir}/ser/modules/avpops.so
+%{_libdir}/ser/modules/dispatcher.so
+%{_libdir}/ser/modules/diversion.so
+%{_libdir}/ser/modules/flatstore.so
+%{_libdir}/ser/modules/gflags.so
+%{_libdir}/ser/modules/options.so
+%{_libdir}/ser/modules/speeddial.so
+%{_libdir}/ser/modules/uri_db.so
+#%endif
+%{_sbindir}/ser
+%{_sbindir}/serctl
+%{_sbindir}/serunix
+%{_sbindir}/gen_ha1
+/usr/sbin/rcser
+
+%{_mandir}/man5/*
+%{_mandir}/man8/*
+
+
+%files mysql
+%defattr(-,root,root)
+
+#%ifarch x86_64
+#%else
+%{_libdir}/ser/modules/mysql.so
+#%endif
+%{_sbindir}/ser_mysql.sh
+
+%files jabber
+%defattr(-,root,root)
+#%ifarch x86_64
+#%else
+%{_libdir}/ser/modules/jabber.so
+#%endif
+%doc %{_docdir}/ser/README.jabber
+
+%files radius
+%defattr(-,root,root)
+#%{_libdir}/ser/modules/auth_radius.so
+#%{_libdir}/ser/modules/group_radius.so
+#%{_libdir}/ser/modules/uri_radius.so
+%doc %{_docdir}/ser/README.auth_radius
+%doc %{_docdir}/ser/README.group_radius
+%doc %{_docdir}/ser/README.uri_radius
+
+
+
+
+%changelog
+
+* Tue Jul 26 2005 Peter Nixon - Suntel Communications <[email protected]>
+- include SUSE version in the rpm filename(s)
+- changed version to 0.9.3 (new upstream release)
+- update rpm package group to match SUSE 9.3
+- removed files no longer in tarball
+- enabled radius modules
+- add symlink for rcser
+
+* Tue Jul 27 2004 Andrei Pelinescu - Onciul <[email protected]>
+- changed vesion to 0.8.14 (new upstream release)
+- added ext to the modules list, removed the radius modules (they depend on radiusclient-ng now)
+
+* Fri Nov 14 2003 Andrei Pelinescu - Onciul <[email protected]>
+- changed vesion to 0.8.12 (new upstream release)
+- added auth_diameter, pdt & mangler to the modules list
+
+* Wed Aug 28 2003 Nils Ohlmeier <[email protected]>
+- replaced modules Conflicts with required Ser version
+- fixed doc installation for SuSE pathes
+- added doc for jabber and radius
+
+* Wed Aug 28 2003 Andrei Pelinescu - Onciul <[email protected]>
+- added doc (READMEs, NEWS, AUTHORS a.s.o)
+- added xlog to the modules list
+
+* Wed Aug 27 2003 Nils Ohlmeier <[email protected]>
+- fixed module dependencys
+- added Conflicts for modules
+
+* Wed Aug 27 2003 Andrei Pelinescu - Onciul <[email protected]>
+- changed vesion to 0.8.11
+- gen_ha1 is now left in _sbindir
+- removed harv_ser.sh
+- added Conflicts
+
+* Mon Jun 2 2003 Andrei Pelinescu - Onciul <[email protected]>
+- added a separate rpm for the radius modules
+- updated to the new makefile variables (removed lots of unnecessary stuff)
+
+* Tue Nov 12 2002 Nils Ohlmeier <[email protected]>
+- replaced expat-devel with expat
+- removed leading + from a few lines
+
+* Tue Nov 12 2002 Andrei Pelinescu - Onciul <[email protected]>
+- added a separate rpm for the jabber modules
+- moved all the binaries to sbin
+- removed obsolete installs (make install installs everything now)
+
+* Mon Oct 28 2002 Nils Ohlmeier <[email protected]>
+- Added mysql and mysql-devel to the Req for the ser-mysql rpm.
+
+* Thu Sep 26 2002 Nils Ohlmeier <[email protected]>
+- Added library path to mysql/Makefile to build on SuSE 8.0
+
+* Thu Sep 26 2002 Nils Ohlmeier <[email protected]>
+- Added 'make [modules|modules-install]' to adapted Makefile changes
+
+* Wed Sep 25 2002 Andrei Pelinescu - Onciul  <[email protected]>
+- modified make install & make: added cfg-target & modules-target
+
+* Wed Sep 25 2002 Nils Ohlmeier <[email protected]>
+- Copyed mysql connectivity subpackage from orig rpm.spec.
+
+* Fri Sep 06 2002 Nils Ohlmeier <[email protected]>
+- Adaptation to SuSE.
+
+* Mon Sep 02 2002 Jan Janak <[email protected]>
+- gen_ha1 utility added, scripts added.
+
+* Tue Aug 28 2002 Jan Janak <[email protected]>
+- Finished the first version of the spec file.
+
+* Sun Aug 12 2002 Jan Janak <[email protected]>
+- First version of the spec file.

+ 0 - 0
pkg/rpm/ser.init.SuSE → pkg/suse/ser.init


+ 0 - 0
pkg/rpm/ser.spec.SuSE → pkg/suse/ser.spec