* modified build script to find out the version the way we do it now.
authorWilfried Göesgens <willi@citadel.org>
Sun, 17 Dec 2006 15:38:36 +0000 (15:38 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 17 Dec 2006 15:38:36 +0000 (15:38 +0000)
* modified debian scripts to utilise sysV init.

citadel/buildpackages
citadel/debian/changelog
citadel/debian/citadel-server.install
citadel/debian/citadel-server.postinst
citadel/debian/citadel-server.prerm
citadel/debian/citadel.init
citadel/debian/rules

index 5d74274de0b500efcdadd66acf158b2bd8ebfa85..7a9ac9b972a879b740747e710cbf9277be2c651f 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
+# find out the package version from conf
+export `grep PACKAGE_VERSION= configure |sed -e "s;';;g" -e "s;PACKAGE;CITADEL;"`
 
-CITADEL_VERSION=`grep '#define CITADEL.*Citadel' citadel.h |sed -e 's;";;g' -e "s;.* ;;"`
 PACKAGE_VERSION=`cat packageversion`
 DATE=`date '+%a, %d %b %Y %H:%I:00 %z'`
 ACTUAL_DIR=`pwd`
@@ -40,7 +41,7 @@ case $1 in
                        -e "s;@CITADEL_VERSION@;${CITADEL_VERSION};" \
                        -e "s;@PACKAGE_VERSION@;${PACKAGE_VERSION};" \
                        > debian/files
-               if grep -q "$CITADEL_VERSION" debian/changelog; then
+               if grep -q "($CITADEL_VERSION" debian/changelog; then
                        echo rebuilding package.
                else
                        echo "citadel (${CITADEL_VERSION}-${PACKAGE_VERSION}) unstable; urgency=low
index 3600ed02515ca44be355627ea2b00e2074986328..b57951f4092dde48fd1fe07eafea1ca65d219214 100644 (file)
@@ -1,54 +1,61 @@
+citadel (7.00-1) unstable; urgency=low
+       
+  * update to actual Citadel CVS. many new features. see Packages changelog.
+
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Sat, 16 Dec 2006 01:01:00 +0100
+       
+
 citadel (6.84-1) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Do, 31 Aug 2006 23:11:00 +0200
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Do, 31 Aug 2006 23:11:00 +0200
        
 
 citadel (6.82-1) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Thu, 22 Jun 2006 20:08:00 +0200
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Thu, 22 Jun 2006 20:08:00 +0200
        
 
 citadel (6.71-1) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Sat, 21 Jan 2006 19:07:00 +0100
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Sat, 21 Jan 2006 19:07:00 +0100
        
 
 citadel (6.70-1) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Sun, 15 Jan 2006 15:03:00 +0100
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Sun, 15 Jan 2006 15:03:00 +0100
        
 
 citadel (6.63-1) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Mon, 12 Dec 2005 11:11:00 +0100
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Mon, 12 Dec 2005 11:11:00 +0100
        
 
 citadel (6.62-1) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Fri, 18 Nov 2005 16:04:00 +0100
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Fri, 18 Nov 2005 16:04:00 +0100
        
 
 citadel (6.61-2) unstable; urgency=low
        
   * update to actual Citadel CVS. many new features. see Packages changelog.
 
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de>  Tue, 01 Nov 2005 12:23:15 +0200
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Tue, 01 Nov 2005 12:23:15 +0200
        
 citadel (6.53-1) unstable; urgency=low
 
   * Initial release Closes: #nnnn  (nnnn is the bug number of your ITP)
 
- -- Wilfried Goesgens <willi@jordy.home.net>  Sat, 23 Jul 2005 12:23:15 +0200
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Sat, 23 Jul 2005 12:23:15 +0200
 
index 19c2b2c4ce673705b266eaa8c219f87097188ea9..a841cbd8519be4e1193ba207bedb855b7aa350b3 100644 (file)
@@ -6,3 +6,4 @@ debian/tmp/usr/sbin/userlist
 debian/tmp/usr/sbin/sendcommand
 debian/tmp/usr/sbin/base64
 debian/tmp/usr/lib/citadel-server/setup
+debian/tmp/usr/lib/citadel-server/ctdlsvc
index f06a7247fad4574cc06653edad651ba7deaa7bf9..5f52f45e717174046b1fbf01f0c94fb6be6a0544 100644 (file)
@@ -167,6 +167,7 @@ case "$1" in
        export SYSADMIN_NAME=$admin
        export CREATE_XINETD_ENTRY=no
        export CREATE_INITTAB_ENTRY=no
+       export NO_INIT_SCRIPTS=yes
        echo "applying your settings."
 # citadel home
 # sysadmin
@@ -187,7 +188,10 @@ case "$1" in
        if test -S /var/run/citadel/citadel.socket; then 
            /usr/sbin/sendcommand "DOWN"
        fi
-       killall -HUP init
+
+       update-rc.d citadel defaults >/dev/null
+
+       echo "run /etc/init.d/citadel start to start citadel service."
     #### There are three sub-cases:
     ###if test "${2+set}" != set; then
     ###  # We're being installed by an ancient dpkg which doesn't remember
@@ -240,6 +244,5 @@ case "$1" in
      exit 0;;
 esac
 
-#DEBHELPER#
 
 exit 0
index b010fa3bc013522ae40bba88860d6a29ef6923e1..8940f4305a9c03f1770e0e5ebd12d74cd742e5d9 100644 (file)
@@ -1,6 +1,4 @@
 #!/bin/sh
 
 # stop the citadel service...
-export CREATE_INITTAB_ENTRY=no
-/usr/lib/citadel-server/setup -q
-killall -HUP init
+/etc/init.d/citadel stop
\ No newline at end of file
index e38b0163febb126334def5e3f6d48f1575c10b8e..1d0d8b385185466e7d66bebb1f2d8c2cf119f245 100644 (file)
@@ -23,7 +23,8 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="Citadel Groupware "
 NAME=citserver
 DAEMON=/usr/sbin/$NAME
-DAEMON_ARGS=" -d -x3 -lmail"
+CTDLSVC=/usr/lib/citadel-server/ctdlsvc
+DAEMON_ARGS=" -x3 -lmail -t/dev/null"
 PIDFILE=$RUNDIR/$NAME.pid
 SCRIPTNAME=/etc/init.d/citadel
 SENDCOMMAND=/usr/sbin/sendcommand
@@ -55,9 +56,12 @@ do_start()
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
-       start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
-               $DAEMON_ARGS \
-               || return 2
+       if $CTDLSVC $PIDFILE $DAEMON \
+               $DAEMON_ARGS ; then
+           return 0
+       else
+           return 2
+       fi
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
@@ -73,13 +77,18 @@ do_stop()
        #   1 if daemon was already stopped
        #   2 if daemon could not be stopped
        #   other if a failure occurred
-        %SENDCOMMAND "DOWN"
+        if $SENDCOMMAND "DOWN" >/dev/null 2>&1 ; then
+           rm -f $PIDFILE
+           return 0
+       else
+           rm -f $PIDFILE
+           return 2
+       fi
 
        #while test -d /proc/`cat $PIDFILE`; do
        #    /usr/bin/printf  '.'
        #    /bin/sleep 1
        #done
-        sleep 5
  
        #start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        #RETVAL="$?"
@@ -94,7 +103,6 @@ do_stop()
        #[ "$?" = 2 ] && return 2
        # Many daemons don't delete their pidfiles when they exit.
        # rm -f $PIDFILE
-       return 0
 }
 
 #
index 9015d45790565372f89acce26216e7c0b7b46877..cec20b37bead5a6f13fceaaf63818081e17f5192 100755 (executable)
@@ -98,6 +98,9 @@ install-arch:
        mv \
                $(CURDIR)/debian/tmp/usr/sbin/setup \
                $(CURDIR)/debian/tmp/usr/lib/citadel-server/
+       mv \
+               $(CURDIR)/debian/tmp/usr/sbin/ctdlsvc \
+               $(CURDIR)/debian/tmp/usr/lib/citadel-server/
 #      cd $(CURDIR)/debian/tmp/usr/share/doc/citadel-server/examples/help; md5sum * >../help.md5sums
 #      cd $(CURDIR)/debian/tmp/usr/share/doc/citadel-server/examples/messages; md5sum * >../messages.md5sums
        cp \