Browse code

pkg/deb/debian: Upgrade debian packaging.

Victor Seva authored on 05/04/2014 08:21:36
Showing 17 changed files
... ...
@@ -49,7 +49,7 @@ sems (1.4.0) maverick; urgency=low
49 49
 
50 50
   * SEMS 1.4.0 release
51 51
 
52
- -- Stefan Sayer <stefan@bansa>  Tue, 15 Mar 2011 11:13:05 +0100
52
+ -- Stefan Sayer <stefan.sayer@frafos.com>  Tue, 15 Mar 2011 11:13:05 +0100
53 53
 
54 54
 sems (1.3.0) unstable; urgency=low
55 55
 
... ...
@@ -61,13 +61,13 @@ sems (1.3.0) unstable; urgency=low
61 61
    * optimizations, especially for signaling
62 62
    * many DSM improvements 
63 63
 
64
- --  <debian@debian>  Sun, 26 Sep 2010 17:35:22 -0400
64
+ --  Stefan Sayer <stefan.sayer@frafos.com>  Sun, 26 Sep 2010 17:35:22 -0400
65 65
 
66 66
 sems (1.2.0) unstable; urgency=low
67 67
 
68 68
   * SEMS 1.2.0 release
69 69
 
70
- -- Stefan Sayer <stefan@waspi>  Tue, 30 Mar 2010 21:46:39 +0200
70
+ -- Stefan Sayer <stefan.sayer@frafos.com>  Tue, 30 Mar 2010 21:46:39 +0200
71 71
 
72 72
 sems (1.1.1) unstable; urgency=low
73 73
 
... ...
@@ -78,7 +78,7 @@ sems (1.1.1) unstable; urgency=low
78 78
     401 and 407 reply in click2dial  - fixed ssl build dependency for
79 79
     DIAMETER client in deb
80 80
 
81
- -- root <root@UNPROVISIONED.lab.iptego.de>  Tue, 07 Jul 2009 15:13:24 +0200
81
+ -- Stefan Sayer <stefan.sayer@frafos.com>  Tue, 07 Jul 2009 15:13:24 +0200
82 82
 
83 83
 sems (1.1.0-1) unstable; urgency=low
84 84
 
... ...
@@ -96,7 +96,7 @@ sems (1.1.0-1) unstable; urgency=low
96 96
   * UID/DID support for voicemail/-box/annrecorder
97 97
   * and quite some bugs and mem leaks fixed, documentation, etc. 
98 98
 
99
- -- Stefan Sayer <stefan.sayer@iptego.com>  Tue, 20 Jan 2009 18:11:25 +0100
99
+ -- Stefan Sayer <sayer@iptel.org>  Tue, 20 Jan 2009 18:11:25 +0100
100 100
 
101 101
 sems (1.1.0-0rc1) unstable; urgency=low
102 102
 
... ...
@@ -1 +1 @@
1
-5
1
+9
... ...
@@ -1,27 +1,45 @@
1 1
 Source: sems
2 2
 Section: net
3 3
 Priority: optional
4
-Maintainer: Stefan Sayer <stefan.sayer@gmail.com>
5
-Build-Depends: debhelper (>= 4), libspeex-dev, flite-dev, libspandsp-dev, libssl-dev, python-dev, sip4 | python-sip, python-sip4-dev | python-sip-dev, openssl, libev-dev, libmysql++-dev, libxml2-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libevent-dev (>= 2.0.0)
6
-Standards-Version: 3.5.2
4
+Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
5
+Uploaders: Victor Seva <linuxmaniac@torreviejawireless.org>
6
+Build-Depends: debhelper (>= 9~),
7
+               flite-dev,
8
+               libcurl4-openssl-dev | libcurl4-gnutls-dev,
9
+               libev-dev,
10
+               libevent-dev (>= 2.0.0),
11
+               libhiredis-dev,
12
+               libmysql++-dev,
13
+               libspandsp-dev,
14
+               libspeex-dev,
15
+               libssl-dev,
16
+               libxml2-dev,
17
+               openssl,
18
+               python-dev,
19
+               python-sip-dev
20
+Standards-Version: 3.9.5
7 21
 
8 22
 Package: sems
9 23
 Architecture: any
10
-Depends: adduser, ${shlibs:Depends}, ${misc:Depends}
11
-Suggests: sems-python-modules
12
-Conflicts: sems-python-modules (<< ${Source-Version})
24
+Depends: adduser, python, ${misc:Depends}, ${shlibs:Depends}
13 25
 Description: SIP Express Media Server, very fast and flexible SIP media server
14
- SEMS, the SIP Express Media Server, is a free, high performance, extensible media
15
- server and SBC for SIP (RFC3261) based VoIP  services. It features voicemail, conferencing,
16
- announcements, pre-call announcements, prepaid service, calling card service etc.
26
+ SEMS, the SIP Express Media Server, is a free, high performance,
27
+ extensible media server and SBC for SIP (RFC3261) based VoIP  services. It
28
+ features voicemail, conferencing, announcements, pre-call announcements,
29
+ prepaid service, calling card service etc.
17 30
 
18
-Package: sems-python-modules
31
+Package: sems-dbg
19 32
 Architecture: any
20
-Depends: ${shlibs:Depends}, sems (= ${Source-Version})
21
-Description: contains the python modules for SEMS
22
- This has been split out of the main SEMS package, so that SEMS will not
23
- depend upon python. This module will enable you to use the applications using the embedded
24
- python interpreter and script new applications in python.
33
+Section: debug
34
+Priority: extra
35
+Depends: sems (= ${binary:Version}), ${misc:Depends}
36
+Description: Debugging symbols for Sems SIP Express Media Server
37
+ SEMS, the SIP Express Media Server, is a free, high performance,
38
+ extensible media server and SBC for SIP (RFC3261) based VoIP  services. It
39
+ features voicemail, conferencing, announcements, pre-call announcements,
40
+ prepaid service, calling card service etc.
41
+ .
42
+ This package contains the debugging sysmbols.
25 43
 
26 44
 Package: libsems1-dev
27 45
 Architecture: any
... ...
@@ -29,9 +47,8 @@ Section: libdevel
29 47
 Depends: ${misc:Depends}
30 48
 Description: development files for SIP Express Media Server
31 49
  SEMS, the SIP Express Media Server, is a free, high performance,
32
- extensible media server and SBC for SIP (RFC3261) based VoIP services.
33
- It features voicemail, conferencing, announcements, pre-call
34
- announcements, prepaid service, calling card service etc.
50
+ extensible media server and SBC for SIP (RFC3261) based VoIP  services. It
51
+ features voicemail, conferencing, announcements, pre-call announcements,
52
+ prepaid service, calling card service etc.
35 53
  .
36
- This package contains the files needed to compile programs
37
- against sems.
54
+ This package contains the files needed to compile sems applications.
... ...
@@ -1,19 +1,34 @@
1
-This package was debianized by Stefan Sayer
2
-<sayer@iptel.org> on Wed Feb  6 20:46:22 CET 2008.
1
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+Upstream-Name: SEMS
3
+Upstream-Contact: semsdev@lists.iptel.org
4
+Source: http://www.iptel.org/sems
3 5
 
4
-All debian stuff was stolen and adapted from SER 
5
-(http://iptel.org/ser).
6
+Files: *
7
+Copyright:
8
+ 2005-2014 Raphael Coeffic <rco@iptel.org>
9
+ 2010-2014 FRAFOS GmbH
10
+ 2005-2014 Stefan Sayer <stefan.sayer@frafos.com>
11
+ 2002-2005 FhG Fokus
12
+ 2006-2010 iptelorg GmbH
13
+ 2007-2009 IPTEGO GmbH
14
+ 2007-2013 Juha Heinanen <jh@tutpro.com>
15
+ 2007 Andreas Granig <agranig@sipwise.com>
16
+ 2009-2010 TelTech Systems Inc.
17
+ 2006-2007 Maxim Sobolev <sobomax@sippysoft.com>
18
+ 2010 Anton Zagorskiy amberovsky@gmail.com
19
+ 2011-2012 Peter Lemenkov <lemenkov@gmail.com>
20
+ Various others (see README file)
21
+License: GPL-2.0+ OpenSSL exception
22
+ On Debian systems, the full text of the GNU General Public
23
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
24
+ * Exception: permission to copy, modify, propagate, and distribute a work
25
+ * formed by combining OpenSSL toolkit software and the code in this file,
26
+ * such as linking with software components and libraries released under
27
+ * OpenSSL project license.
6 28
 
7
-It was downloaded from http://iptel.org/sems.
8
-
9
-Upstream Authors: Raphael Coeffic <raphael.coeffic@tekelec.com>,
10
-Stefan Sayer <stefan.sayer@iptego.com>, Juha Heinanen, Maxim
11
-Sobolev, Andreas Granig  (see AUTHORS file for details)
12
-
13
-This software is copyright (c) 2002-2005 by FhG Fokus
14
-
15
-You are free to distribute this software under the terms of
16
-the GNU General Public License.
17
-
18
-On Debian systems, the complete text of the GNU General Public
19
-License can be found in the file `/usr/share/common-licenses/GPL.
29
+Files: debian/*
30
+Copyright: 2014 Victor Seva <linuxmaniac@torreviejawireless.org>
31
+           2008-2014, Stefan Sayer <stefan.sayer@frafos.com>
32
+License: GPL-2+
33
+ On Debian systems, the full text of the GNU General Public
34
+ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.
... ...
@@ -1,13 +1,13 @@
1 1
 Makefile.defs usr/include/sems/
2 2
 core/*.h usr/include/sems/
3 3
 core/SampleArray.cc usr/include/sems/
4
-core/sip/*.h usr/include/sems/sip/
5
-core/plug-in/Makefile.app_module usr/include/sems/plug-in/
6
-core/plug-in/Makefile.audio_module usr/include/sems/plug-in/
7
-core/ampi usr/include/sems/
8 4
 core/amci usr/include/sems/
9
-core/compat/*.h usr/include/sems/compat/
5
+core/ampi usr/include/sems/
10 6
 core/compat/*.c usr/include/sems/compat/
11
-core/compat/getos usr/include/sems/compat/
7
+core/compat/*.h usr/include/sems/compat/
12 8
 core/compat/getarch usr/include/sems/compat/
9
+core/compat/getos usr/include/sems/compat/
10
+core/plug-in/Makefile.app_module usr/include/sems/plug-in/
11
+core/plug-in/Makefile.audio_module usr/include/sems/plug-in/
13 12
 core/rtp usr/include/sems/
13
+core/sip/*.h usr/include/sems/sip/
14 14
deleted file mode 100644
... ...
@@ -1,192 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-# don't do anything when called with other argument than configure 
6
-case "$1" in
7
-  configure)
8
-  ;;  
9
-  abort-upgrade|abort-remove|abort-deconfigure)
10
-    exit 0
11
-  ;;
12
-  *)
13
-    echo "postinst called with unknown argument \$1'" >&2
14
-    exit 1
15
-  ;;
16
-esac
17
-
18
-. /usr/share/debconf/confmodule
19
-
20
-# add sems user
21
-adduser --quiet --system --group --disabled-password --shell /bin/false \
22
-
23
-if [ -d /usr/doc -a ! -e /usr/doc/sems -a -d /usr/share/doc/sems ]; then
24
-  ln -sf ../share/doc/sems /usr/doc/sems
25
-fi
26
-
27
-
28
-# ser defaults file, which will be modified by this script
29
-DEFAULTFILE=/etc/default/sems
30
-
31
-if ! test -e $DEFAULTFILE; then
32
-  echo "Warning: sems postinst script can't find config file $DEFAULTFILE. Configuration aborted."
33
-  exit 0
34
-fi
35
-
36
-# create voicebox spool directory if 
37
-if [ ! -d /var/spool/voicebox ]; then 
38
-  mkdir -p /var/spool/voicebox/
39
-fi
40
-
41
-# make directory writable for sems user
42
-if [ -d /var/spool/voicebox ]; then 
43
-  chown sems /var/spool/voicebox
44
-fi
45
-
46
-# ----------------------------------------------------------------------
47
-
48
-function fn_config_replace 
49
-{
50
-	if test $# -ne 2; then
51
-	  echo "Error - bad number of input parameters"
52
-	  echo "usage:"
53
-	  echo "fn_config_replace config_file CFG_OPTION_something" 
54
-	  exit 1
55
-	fi
56
-
57
-	FILENAME="$1"
58
-	ITEM="$2"
59
-
60
-	echo "Changing config option $ITEM."
61
-	OLDFILE="$FILENAME.config_replace_bck"
62
-	cp -f $FILENAME $OLDFILE
63
-
64
-	REPLACEMENT="$FILENAME.repl"
65
-	TEMPFILE="$FILENAME.temp"
66
-	TAIL="$FILENAME.tail"
67
-
68
-	rm -f $REPLACEMENT
69
-	touch $REPLACEMENT # needed if the input is empty
70
-	while read -r LINE
71
-	do
72
-	  echo "$LINE" >> $REPLACEMENT
73
-	done
74
-
75
-	STARTPOS=`nl -b a $FILENAME | grep -w "DEBCONF-$ITEM-START" | sed -e "s/^ *\([0-9]*\).*/\1/g"`
76
-	if [ "$STARTPOS" == "" ]; then
77
-		echo "WARNING: section $ITEM not found"
78
-		return
79
-	fi
80
-		
81
-	ENDPOS=`nl -b a $FILENAME | sed -e "1,${STARTPOS}d" | grep "DEBCONF-$ITEM-END" | head -n 1 | sed -e "s/^ *\([0-9]*\).*/\1/g"`
82
-	if [ "$STARTPOS" == "" ]; then
83
-		echo "WARNING: end of section $ITEM not found"
84
-		return
85
-	fi
86
-	ENDPOS=$(($ENDPOS-1))
87
-	STARTPOS=$(($STARTPOS+1))
88
-
89
-	cat $FILENAME | sed -e "1,${ENDPOS}d" > $TAIL
90
-	cat $FILENAME | sed -e "${STARTPOS},\$d" > $TEMPFILE
91
-	cat $REPLACEMENT >> $TEMPFILE
92
-	cat $TAIL >> $TEMPFILE
93
-	rm -f $TAIL
94
-	mv -f $TEMPFILE $FILENAME
95
-}
96
-
97
-# pads $1 with as many empty rows as needed until $2 lines are complete
98
-padLines() {
99
-	output="$1"
100
-	needed="$2"
101
-	num=`echo "$output" | wc -l`
102
-	echo "$output"
103
-	moreneeded=$(($needed-$num))
104
-	while (true); do
105
-	if [ $moreneeded -gt 0 ]
106
-	then
107
-		echo ""
108
-		moreneeded=$(($moreneeded-1))
109
-	else
110
-		break
111
-	fi
112
-	done
113
-}
114
-
115
-#----------------------------------------------------------------------------
116
-
117
-
118
-db_get sems/config
119
-if [ "$RET" = "false" ] ; then
120
-  # do not change config file
121
-  echo "Package sems postinstall script: NOT modifying config file $DEFAULTFILE."
122
-else
123
-
124
-BACKUP="$DEFAULTFILE.config_bck"
125
-
126
-echo "Package sems postinstall script: MODIFYING config file $DEFAULTFILE."
127
-echo "Creating backup copy as $BACKUP"
128
-cp -f $DEFAULTFILE $BACKUP
129
-
130
-db_get sems/USER
131
-if test "$RET" != "!" ; then
132
-  fn_config_replace $DEFAULTFILE USER <<+++
133
-SEMS_USER="$RET"
134
-+++
135
-fi
136
-
137
-db_get sems/GROUP
138
-if test "$RET" != "!" ; then
139
-  fn_config_replace $DEFAULTFILE GROUP <<+++
140
-SEMS_GROUP="$RET"
141
-+++
142
-fi
143
-
144
-#db_get sems/WORKDIR
145
-#if test "$RET" != "!" ; then
146
-#  fn_config_replace $DEFAULTFILE WORKDIR <<+++
147
-#SEMS_WORKDIR="$RET"
148
-#+++
149
-#fi
150
-
151
-db_get sems/CREATE_CORE
152
-if test "$RET" != "!" ; then
153
-  fn_config_replace $DEFAULTFILE CREATE_CORE <<+++
154
-SEMS_CREATE_CORE="$RET"
155
-+++
156
-fi
157
-
158
-db_get sems/COREDIR
159
-if test "$RET" != "!" ; then
160
-  fn_config_replace $DEFAULTFILE COREDIR <<+++
161
-SEMS_COREDIR="$RET"
162
-+++
163
-fi
164
-
165
-fi # if changing config
166
-
167
-echo ""
168
-echo "***"
169
-echo "Configuration of sems has finished."
170
-echo ""
171
-echo "To restart it when configuration has changed use '/etc/init.d/sems restart'"
172
-echo ""
173
-echo "To change it's configuration use 'dpkg-reconfigure sems'"
174
-echo "***"
175
-echo ""
176
-
177
-echo "Setting sems to start automatically"
178
-/usr/sbin/update-rc.d sems defaults || true
179
-
180
-
181
-if [ -x "/etc/init.d/sems" ]; then
182
-  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
183
-    invoke-rc.d sems restart 3>/dev/null || exit 0
184
-  else
185
-    /etc/init.d/sems restart 3>/dev/null || exit 0
186
-  fi
187
-fi
188
-                                                                
189
-
190
-exit 0
191
-
192 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-#!/bin/sh
2
-
3
-#DEBHELPER#
4
-
5
-if [ "$1" = "purge" ] ; then
6
-  # remove user/group on purge
7
-  deluser --quiet --remove-home sems &>/dev/null || true
8
-  # remove /etc/ser if empty
9
-  rmdir /etc/sems || true
10
-fi
11
-
12
-exit 0
13
-
... ...
@@ -1,87 +1,36 @@
1 1
 #!/usr/bin/make -f
2
-# Sample debian/rules that uses debhelper.
3
-# GNU copyright 1997 to 1999 by Joey Hess.
4
-#
5
-# $Id: rules,v 1.7 2007/12/20 14:21:19 paka Exp $
6
-#
7
-# History:
8
-# --------
9
-#  2008-02-06  stolen from SER and adapted for SEMS (stefan)
2
+# -*- makefile -*-
10 3
 
11 4
 # Uncomment this to turn on verbose mode.
12 5
 export DH_VERBOSE=1
13 6
 
14
-# This is the debhelper compatibility version to use.
15
-# export DH_COMPAT=5
16
-#  -- already set in compat
17
-#  force no striping (always include debug symbols for now)
18
-export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) nostrip"
19
-
20 7
 PYTHON_MODULES=ivr conf_auth mailbox pin_collect
21 8
 
22
-EXCLUDED_MODULES=gateway examples mp3 twit py_sems
9
+EXCLUDED_MODULES=gateway examples mp3 twit
23 10
 
24 11
 EXCLUDED_DSM_MODULES=mod_aws
25 12
 EXCLUDED_DSM_PY_MODULES=mod_aws mod_py
26
-CPPFLAGS += -DHAVE_XMLRPCPP_SSL 
27
-# for older than lenny add:
28
-# -DHAVE_OLD_SPANDSP_CALLBACK
29
-
30
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
31
-	CFLAGS += -g
32
-endif
33
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
34
-	INSTALL_PROGRAM += -s
35
-endif
36
-
37 13
 
38
-configure: configure-stamp
39
-configure-stamp:
40
-	dh_testdir
41
-# Add here commands to configure the package.
14
+CPPFLAGS += -DHAVE_XMLRPCPP_SSL
42 15
 
43
-	touch configure-stamp
16
+export USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)"
44 17
 
45
-build: build-stamp
18
+%:
19
+	dh $@
46 20
 
47
-build-stamp: configure-stamp 
48
-	dh_testdir
49
-
50
-# Add here commands to compile the package.
51
-	USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \
21
+override_dh_auto_build:
52 22
 	$(MAKE) \
53 23
 	cfg-target=/etc/sems/ prefix=/usr \
54 24
 	exclude_app_modules="$(EXCLUDED_MODULES)" \
55 25
 	exclude_dsm_modules="$(EXCLUDED_DSM_MODULES)" \
56 26
 	DESTDIR=$(CURDIR)/debian/sems
57
-#/usr/bin/docbook-to-man debian/ser.sgml > ser.1
58
-
59
-	touch build-stamp
60
-
61
-clean:
62
-	dh_testdir
63
-	dh_testroot
64
-	rm -f build-stamp configure-stamp
65 27
 
66
-# Add here commands to clean up after the build process.
67
-
68
-	dh_clean
69
-
70
-install: build
71
-	dh_testdir
72
-	dh_testroot
73
-	dh_clean -k
74
-	dh_install
75
-#	dh_installdirs
76
-
77
-# Add here commands to install the package into debian/sems
78
-	USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \
28
+override_dh_auto_install:
79 29
 	$(MAKE) -C core/ install \
80 30
 		DESTDIR=$(CURDIR)/debian/sems \
81 31
 		prefix=/usr \
82 32
 		cfg-target=/etc/sems/
83 33
 
84
-	USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \
85 34
 	$(MAKE) -C apps/ install \
86 35
 		exclude_app_modules="$(EXCLUDED_MODULES) $(PYTHON_MODULES)" \
87 36
 		exclude_dsm_modules="$(EXCLUDED_DSM_PY_MODULES)" \
... ...
@@ -89,75 +38,5 @@ install: build
89 38
 		prefix=/usr \
90 39
 		cfg-target=/etc/sems/
91 40
 
92
-# install only the python modules
93
-	USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \
94
-	$(MAKE) -C apps/ install \
95
-		app_modules="$(PYTHON_MODULES)" \
96
-		DESTDIR=$(CURDIR)/debian/sems-python-modules \
97
-		prefix=/usr \
98
-		cfg-target=/etc/sems/  
99
-
100
-# install mod_py DSM module
101
-	USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \
102
-	$(MAKE) -C apps/dsm/mods/mod_py install \
103
-		DESTDIR=$(CURDIR)/debian/sems-python-modules \
104
-		prefix=/usr \
105
-		cfg-target=/etc/sems/  
106
-
107
-# This single target is used to build all the packages, all at once, or
108
-# one at a time. So keep in mind: any options passed to commands here will
109
-# affect _all_ packages. Anything you want to only affect one package
110
-# should be put in another target, such as the install target.
111
-binary-common: 
112
-	dh_testdir
113
-	dh_testroot
114
-	dh_installdebconf	
115
-	dh_installdocs doc/*.txt
116
-	dh_installdocs doc/dsm/
117
-	dh_installexamples
118
-	dh_installmenu
119
-#	dh_installlogrotate
120
-#	dh_installemacsen
121
-#	dh_installpam
122
-#	dh_installmime
123
-	dh_installinit  -- defaults 23
124
-	dh_installcron
125
-	dh_installman
126
-	dh_installinfo
127
-#	dh_undocumented
128
-	dh_installchangelogs 
129
-	dh_link
130
-	dh_strip
131
-	dh_compress 
132
-	dh_fixperms
133
-
134
-#       fixperms (rightly) sets 644 to getos/getarch (should it be somewhere else?)
135
-	chmod 755 $(CURDIR)/debian/libsems1-dev/usr/include/sems/compat/getos
136
-	chmod 755 $(CURDIR)/debian/libsems1-dev/usr/include/sems/compat/getarch
137
-
138
-#	dh_makeshlibs
139
-	dh_installdeb
140
-#	dh_perl
141
-	dh_shlibdeps
142
-	dh_gencontrol
143
-	dh_md5sums
144
-	dh_builddeb
145
-
146
-# Build architecture-independent packages using the common target
147
-binary-indep: build install
148
-# (Uncomment this next line if you have such packages.)
149
-#        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
150
-# We have nothing to do by default.
151
-
152
-
153
-# Build architecture-dependent packages using the common target
154
-binary-arch: build install
155
-	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
156
-
157
-# Any other binary targets build just one binary package at a time.
158
-binary-%: build install
159
-	$(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$*
160
-
161
-binary: binary-indep binary-arch
162
-.PHONY: build clean binary-indep binary-arch binary install configure
163
-
41
+override_dh_strip:
42
+	dh_strip --dbg-package=sems-dbg
164 43
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-#!/bin/sh -e
2
-
3
-. /usr/share/debconf/confmodule
4
-
5
-# configure ?
6
-db_input medium sems/config || true
7
-db_go
8
-
9
-db_get sems/config
10
-
11
-if [ "$RET" = "false" ]; then
12
-  exit 0
13
-fi
14
-
15
-db_input medium sems/USER || true
16
-db_go
17
-
18
-db_input medium sems/GROUP || true
19
-db_go
20
-
21
-db_input medium sems/CREATE_CORE || true
22
-db_go
23
-
24
-db_input medium sems/COREDIR || true
25
-db_go
26
-
... ...
@@ -2,37 +2,24 @@
2 2
 #
3 3
 # this file is sourced by SEMS init script /etc/init.d/sems
4 4
 
5
-# Note: the #DEBCONF-xxx-START and DEBCONF-xxx-END lines are used for
6
-# debconf configuration, please don't remove or alter them.
5
+# Don't start with default config as we need to deploy the ngcp-templates first
6
+SEMS_RUN="no"
7 7
 
8
-# SEMS configuration file
9
-#DEBCONF-CFG_FILE-START
8
+# ser configuration file
10 9
 SEMS_CFG_FILE="/etc/sems/sems.conf"
11
-#DEBCONF-CFG_FILE-END
12
-
13
-# WARN:  if SEMS_USER/SEMS_GROUP is set, dumping core
14
-#        might not work any more on linux
15 10
 
16 11
 # user to run SEMS as
17
-#DEBCONF-USER-START
18 12
 SEMS_USER="sems"
19
-#DEBCONF-USER-END
20 13
 
21 14
 # group to run SEMS as
22
-#DEBCONF-GROUP-START
23 15
 SEMS_GROUP="sems"
24
-#DEBCONF-GROUP-END
25 16
 
26
-# ser pidfile
27
-SEMS_PIDFILE="/var/run/sems/sems.pid"
28
-HOMEDIR=/var/run/sems
17
+SEMS_RUNDIR="/var/run/sems"
18
+
19
+# sems pidfile
20
+SEMS_PIDFILE="$SEMS_RUNDIR/sems.pid"
29 21
 
30 22
 # set if you want to create core files
31
-#DEBCONF-CREATE_CORE-START
32 23
 SEMS_CREATE_CORE="yes"
33
-#DEBCONF-CREATE_CORE-END
34 24
 
35
-#DEBCONF-COREDIR-START
36 25
 SEMS_COREDIR="/var/cores"
37
-#DEBCONF-COREDIR-END
38
-
... ...
@@ -8,12 +8,19 @@
8 8
 # Short-Description: Start/stop SEMS Application Server
9 9
 ### END INIT INFO
10 10
 
11
+. /lib/lsb/init-functions
11 12
 
12 13
 # read configuration from /etc/default/sems file
13 14
 if test -f /etc/default/sems ; then
14 15
   . /etc/default/sems
15 16
 fi
16 17
 
18
+
19
+if test "$SEMS_RUN" = "no" ; then
20
+    log_failure_msg "Sems start disabled by default file"
21
+    exit 0
22
+fi
23
+
17 24
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
18 25
 DAEMON=/usr/sbin/sems
19 26
 NAME=sems
... ...
@@ -21,6 +28,11 @@ DESC=sems
21 28
 
22 29
 PARAMS=""
23 30
 
31
+if ! test -d $SEMS_RUNDIR ; then
32
+   mkdir $SEMS_RUNDIR
33
+fi
34
+chown $SEMS_USER:$SEMS_GROUP $SEMS_RUNDIR
35
+
24 36
 if test "$SEMS_PIDFILE" ; then
25 37
   PARAMS="$PARAMS -P $SEMS_PIDFILE"
26 38
 fi
... ...
@@ -43,18 +55,16 @@ if test "$SEMS_CREATE_CORE" = "yes" ; then
43 55
 	[ -d $SEMS_COREDIR ] || mkdir $SEMS_COREDIR
44 56
 	chmod 777 $SEMS_COREDIR
45 57
 	echo "$SEMS_COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
58
+	echo 2 > /proc/sys/fs/suid_dumpable
46 59
 	ulimit -c unlimited
47 60
 fi
48 61
 
49
-if ! test -f $DAEMON ; then
50
-  echo "Error: cannot find $DAEMON"
51
-  exit 0
52
-fi
62
+# raise file descriptors limit - call hold consumes two fds for RTP ports and one for moh file
63
+ulimit -n 100000
53 64
 
54
-# /var/run can be a tmpfs
55
-if [ ! -d $HOMEDIR ]; then
56
-    mkdir -p $HOMEDIR
57
-    chown $SEMS_USER:$SEMS_GROUP $HOMEDIR
65
+if ! test -f $DAEMON ; then
66
+  log_failure_msg "Error: cannot find $DAEMON"
67
+  exit 1
58 68
 fi
59 69
 
60 70
 LD_LIBRARY_PATH=/usr/lib/sems
... ...
@@ -62,49 +72,21 @@ export LD_LIBRARY_PATH
62 72
 
63 73
 set -e
64 74
 
65
-. /lib/lsb/init-functions
66
-
67 75
 case "$1" in
68 76
   start)
69
-	echo "Starting $DESC: $NAME"
77
+	log_daemon_msg "Starting $DESC: $NAME "
70 78
 	start-stop-daemon --start --quiet --oknodo --pidfile $SEMS_PIDFILE \
71 79
 		--exec $DAEMON -- $PARAMS
72 80
 	log_end_msg $?
73 81
 	;;
74 82
   stop)
75
-	echo -n "Stopping $DESC: $NAME"
83
+	log_daemon_msg "Stopping $DESC: $NAME "
76 84
 	start-stop-daemon --oknodo --stop --quiet --pidfile $SEMS_PIDFILE \
77 85
 		--exec $DAEMON
78 86
 	log_end_msg $?
79 87
 	;;
80
-  #reload)
81
-	#
82
-	#	If the daemon can reload its config files on the fly
83
-	#	for example by sending it SIGHUP, do it here.
84
-	#
85
-	#	If the daemon responds to changes in its config file
86
-	#	directly anyway, make this a do-nothing entry.
87
-	#
88
-	# echo "Reloading $DESC configuration files."
89
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
90
-	#	$SEMS_PIDFILE --exec $DAEMON
91
-  #;;
92 88
   restart|force-reload)
93
-	#
94
-	#	If the "reload" option is implemented, move the "force-reload"
95
-	#	option to the "reload" entry above. If not, "force-reload" is
96
-	#	just the same as "restart".
97
-	#
98
-	# Check if configuration is valid before restarting the server
99
-        #(($DAEMON $CFGPARAMS -c 2>&1) | grep "config file ok, exiting") > /dev/null
100
-	#if [ $? -ne 0 ]; then
101
-        #    ($DAEMON $CFGPARAMS -c 2>&1)
102
-	#    echo -e "\nThere are errors in the configuration file. Please fix them first"
103
-	#    echo -e "\n$out\n"
104
-	#    exit 0
105
-	#fi
106
-	
107
-	echo "Restarting $DESC: $NAME"
89
+	log_daemon_msg "Restarting $DESC: $NAME "
108 90
 	start-stop-daemon --oknodo --stop --quiet --pidfile \
109 91
 		$SEMS_PIDFILE --exec $DAEMON
110 92
 	sleep 5
... ...
@@ -117,7 +99,6 @@ case "$1" in
117 99
        ;;
118 100
   *)
119 101
 	N=/etc/init.d/$NAME
120
-	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
121 102
 	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
122 103
 	exit 1
123 104
 	;;
124 105
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+sems: possible-gpl-code-linked-with-openssl
0 2
new file mode 100644
... ...
@@ -0,0 +1,25 @@
1
+#!/bin/sh
2
+
3
+set -e
4
+
5
+# don't do anything when called with other argument than configure
6
+case "$1" in
7
+  configure)
8
+  ;;
9
+  abort-upgrade|abort-remove|abort-deconfigure)
10
+    exit 0
11
+  ;;
12
+  *)
13
+    echo "postinst called with unknown argument \$1'" >&2
14
+    exit 1
15
+  ;;
16
+esac
17
+
18
+# add sems user
19
+adduser --quiet --system --group --disabled-password --shell /bin/false \
20
+--gecos "SIP Express Media Server" --home /var/run/sems sems || true
21
+
22
+#DEBHELPER#
23
+
24
+exit 0
25
+
0 26
new file mode 100644
... ...
@@ -0,0 +1,18 @@
1
+#!/bin/sh
2
+
3
+set -e
4
+
5
+#DEBHELPER#
6
+
7
+if [ "$1" = "purge" ] ; then
8
+  # remove user/group on purge
9
+  if [ -x "$(command -v deluser)" ]; then
10
+    deluser --quiet --remove-home sems >/dev/null 2>&1 || true
11
+  else
12
+    echo >&2 "not removing sems system account because deluser command was not found"
13
+  fi
14
+  # remove /etc/sems if empty
15
+  rmdir /etc/sems || true
16
+fi
17
+
18
+exit 0
0 19
deleted file mode 100644
... ...
@@ -1,48 +0,0 @@
1
-Template: sems/config
2
-Type: boolean
3
-Default: false
4
-Description: Change config file now ?
5
- You have now opportunity to modify basic configuration values in '/etc/default/sems'
6
- config file for SEMS Sip Express Media Server, installed from 'sems' package. Settings from this
7
- file are used by SEMS init script when it is started - e.g. size of shared memory used,
8
- usems and group to run as, working directory.
9
- .
10
- If you do not want to modify the config file now you can modify it manually later,
11
- or repeat this configuartion by running "dpkg-reconfigure sems".
12
- .
13
- Note: if you choose 'yes' here then the values you enter will be automatically applied
14
- each time the sems package is upgraded (or installed without purging previous installation).
15
-
16
-Template: sems/USER
17
-Type: string
18
-Default: sems
19
-Description: User to run SEMS as
20
- Set the user which SEMS should run as. Default is 'sems' user.
21
- .
22
- Note: if you want sems to be able to dump a core file in case of crash, you may have to run it as root user.
23
- Leave this free to run as root user.
24
- .
25
- Enter "!" to not modify this option.
26
-
27
-Template: sems/GROUP
28
-Type: string
29
-Default: sems
30
-Description: Group to run SEMS as
31
- Set the group which SEMS should run as. Default is 'sems' group.
32
- .
33
- Note: if you want sems to be able to dump a core file in case of crash, you may have to run it as root user.
34
- Leave this free to run as root user.
35
- .
36
- Enter "!" to not modify this option.
37
-
38
-Template: sems/CREATE_CORE
39
-Type: boolean
40
-Default: false
41
-Description: Create core files
42
- If enabled, core files will be created in the event of a crash. 
43
-
44
-Template: sems/COREDIR
45
-Type: string
46
-Default: /var/cores
47
-Description: Set directory for core files
48
- This is the directory where core files will be created. 
49 0
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+3.0 (native)
0 2
deleted file mode 100644
... ...
@@ -1,7 +0,0 @@
1
-# Example watch control file for uscan
2
-# Rename this file to "watch" and then you can run the "uscan" command
3
-# to check for upstream updates and more.
4
-version=2
5
-
6
-# Site		Directory		Pattern			Version	Script
7
-ftp://ftp.berlios.de/pub/sems/latest/src/sems-(.*)_src\.tar\.gz	debian	uupdate