This is an automated email from the git hooks/post-receive script.

spectra pushed a commit to branch master
in repository conquest-dicom-server.

commit 585ab0cf3badfbd99e8bc29d7a257a65e2a01728
Author: Mathieu Malaterre <[email protected]>
Date:   Thu Jul 5 08:15:25 2012 +0000

    Install deamon
    
    git-svn-id: 
svn+ssh://svn.debian.org/svn/debian-med/trunk/packages/conquest-dicom-server/trunk@11561
 d8681a01-af0d-0410-a158-b4166a59cfaa
---
 debian/conquest-dicom-server.dirs     |   1 +
 debian/conquest-dicom-server.init     | 159 ++++++++++++++++++++++++++++++++++
 debian/conquest-dicom-server.postinst |  14 +++
 debian/conquest-dicom-server.prerm    |  14 +++
 debian/patches/debianlayout.patch     |  42 +++++++++
 debian/patches/series                 |   1 +
 debian/rules                          |  28 ++++--
 7 files changed, 250 insertions(+), 9 deletions(-)

diff --git a/debian/conquest-dicom-server.dirs 
b/debian/conquest-dicom-server.dirs
new file mode 100644
index 0000000..48accb3
--- /dev/null
+++ b/debian/conquest-dicom-server.dirs
@@ -0,0 +1 @@
+/var/lib/conquest-dicom-server/data/dbase/
diff --git a/debian/conquest-dicom-server.init 
b/debian/conquest-dicom-server.init
new file mode 100755
index 0000000..51c24f4
--- /dev/null
+++ b/debian/conquest-dicom-server.init
@@ -0,0 +1,159 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          dgate
+# Required-Start:    $network $local_fs $remote_fs
+# Required-Stop:     $network $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Init-Script for Conquest DICOM Server: dgate
+### END INIT INFO
+
+# Author: Mathieu Malaterre <[email protected]>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Conquest DICOM Server"
+NAME=dgate
+DAEMON=/usr/lib/conquest-dicom-server/$NAME # Introduce the server's location 
here
+#STORESCP_PORT="11112"
+DAEMON_ARGS="-^/var/log/dgate.log"             # Arguments to run the daemon 
with
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+#STORESCP_CFG="/etc/dcmtk/storescp.cfg"
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+#[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+#case "$STORESCP_ENABLE" in
+#    [Nn]*)
+#        exit 0
+#        ;;
+#esac
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+       # Return
+       #   0 if daemon has been started
+       #   1 if daemon was already running
+       #   2 if daemon could not be started
+       #start-stop-daemon --start --verbose --pidfile $PIDFILE --exec $DAEMON 
--test > /dev/null \
+       #       || return 1
+       start-stop-daemon --background --start --verbose --make-pidfile 
--pidfile $PIDFILE --exec $DAEMON -- \
+               $DAEMON_ARGS
+       # 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.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+       # Return
+       #   0 if daemon has been stopped
+       #   1 if daemon was already stopped
+       #   2 if daemon could not be stopped
+       #   other if a failure occurred
+       #start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile 
$PIDFILE --name $NAME
+       #RETVAL="$?"
+       #[ "$RETVAL" = 2 ] && return 2
+       # Wait for children to finish too if this is a daemon that forks
+       # and if the daemon is only ever run from this initscript.
+       # If the above conditions are not satisfied then add some other code
+       # that waits for the process to drop all resources that could be
+       # needed by services started subsequently.  A last resort is to
+       # sleep for some time.
+       start-stop-daemon --stop --verbose --oknodo --pidfile $PIDFILE 
+       RETVAL="$?"
+       #[ "$?" = 2 ] && return 2
+       # Many daemons don't delete their pidfiles when they exit.
+       rm -f $PIDFILE
+       return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+       #
+       # If the daemon can reload its configuration without
+       # restarting (for example, when it is sent a SIGHUP),
+       # then implement that here.
+       #
+       start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name 
$NAME
+       return 0
+}
+
+case "$1" in
+  start)
+    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+       esac
+  ;;
+  stop)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+       do_stop
+       case "$?" in
+               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+       esac
+       ;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  #reload|force-reload)
+       #
+       # If do_reload() is not implemented then leave this commented out
+       # and leave 'force-reload' as an alias for 'restart'.
+       #
+       #log_daemon_msg "Reloading $DESC" "$NAME"
+       #do_reload
+       #log_end_msg $?
+       #;;
+  restart|force-reload)
+       #
+       # If the "reload" option is implemented then remove the
+       # 'force-reload' alias
+       #
+       log_daemon_msg "Restarting $DESC" "$NAME"
+       do_stop
+       case "$?" in
+         0|1)
+               do_start
+               case "$?" in
+                       0) log_end_msg 0 ;;
+                       1) log_end_msg 1 ;; # Old process is still running
+                       *) log_end_msg 1 ;; # Failed to start
+               esac
+               ;;
+         *)
+               # Failed to stop
+               log_end_msg 1
+               ;;
+       esac
+       ;;
+  *)
+       #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+       exit 3
+       ;;
+esac
+
+:
diff --git a/debian/conquest-dicom-server.postinst 
b/debian/conquest-dicom-server.postinst
new file mode 100644
index 0000000..2482e02
--- /dev/null
+++ b/debian/conquest-dicom-server.postinst
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" != "configure" -a "$1" != "purge" ]; then
+  exit 0
+fi
+
+/usr/lib/conquest-dicom-server/dgate -v -r
+
+exit 0
+
diff --git a/debian/conquest-dicom-server.prerm 
b/debian/conquest-dicom-server.prerm
new file mode 100644
index 0000000..00b1e17
--- /dev/null
+++ b/debian/conquest-dicom-server.prerm
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" != "remove" -a "$1" != "purge" ]; then
+  exit 0
+fi
+
+rm /var/log/dgate.log
+
+exit 0
+
diff --git a/debian/patches/debianlayout.patch 
b/debian/patches/debianlayout.patch
new file mode 100644
index 0000000..5508347
--- /dev/null
+++ b/debian/patches/debianlayout.patch
@@ -0,0 +1,42 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ conquest-dicom-server (1.14.16-1) unstable; urgency=low
+ .
+   * Initial release (Closes: #)
+Author: Mathieu Malaterre <[email protected]>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- conquest-dicom-server-1.14.16.orig/dicom.ini.sqlite
++++ conquest-dicom-server-1.14.16/dicom.ini.sqlite
+@@ -19,7 +19,7 @@ SOPClassList             = dgatesop.lst
+ 
+ # Host for postgres or mysql only, name, username and password for database
+ SQLHost                  = localhost
+-SQLServer                = ./data/dbase/conquest.db3
++SQLServer                = 
/var/lib/conquest-dicom-server/data/dbase/conquest.db3
+ Username                 = dontcare
+ Password                 = dontcare
+ PostGres                 = 0
+@@ -83,4 +83,4 @@ OperatorConsole          = 127.0.0.1
+ # Configuration of disk(s) to store images
+ MAGDeviceThreshhold      = 0
+ MAGDevices               = 1
+-MAGDevice0               = ./data/
++MAGDevice0               = /var/lib/conquest-dicom-server/data/
diff --git a/debian/patches/series b/debian/patches/series
index 52267da..5efb7e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix_int32.patch
+debianlayout.patch
diff --git a/debian/rules b/debian/rules
index db9d63b..c7ecca3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,35 +1,45 @@
 #!/usr/bin/make -f
 #export DH_VERBOSE=1
 
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
 %:
        dh $@ --parallel
 
 jasper-1.900.1-6ct/src/libjasper/.libs/libjasper.a:
        cd jasper-1.900.1-6ct
        ./configure --disable-libjpeg
-       make
+       $(MAKE)
 
 jpeg-6c/libjpeg.a:
        cd jpeg-6c/
        ./configure
-       make
+       $(MAKE)
 
 dgate: jpeg-6c/libjpeg.a jasper-1.900.1-6ct/src/libjasper/.libs/libjasper.a
-       g++ $(CPPFLAGS) $(CXXFLAGS) -Ijasper-1.900.1-6ct/src/libjasper/include 
-Ijpeg-6c -I/usr/include/lua5.1 -DUNIX -DNATIVE_ENDIAN=1 -DHAVE_LIBJASPER 
-DHAVE_LIBJPEG -DUSESQLITE -Wno-write-strings total.cpp -o dgate -lpthread -ldl 
-llua5.1 -lsqlite3 jpeg-6c/libjpeg.a 
jasper-1.900.1-6ct/src/libjasper/.libs/libjasper.a -Wno-multichar $(LDFLAGS)
+       g++ $(CPPFLAGS) $(CXXFLAGS) -Ijasper-1.900.1-6ct/src/libjasper/include 
-Ijpeg-6c -I/usr/include/lua5.1 -DUNIX -DNATIVE_ENDIAN=1 -DHAVE_LIBJASPER 
-DHAVE_LIBJPEG -DUSESQLITE -Wno-write-strings total.cpp -o dgate -lpthread 
-llua5.1 -lsqlite3 jpeg-6c/libjpeg.a 
jasper-1.900.1-6ct/src/libjasper/.libs/libjasper.a -Wno-multichar $(LDFLAGS)
 
 override_dh_auto_build: dgate
        cp dicom.ini.sqlite dicom.ini
        cp dicom.sql.sqlite dicom.sql
+       # ???
+       #cp dicom.ini.www dicom.ini
 
 override_dh_install:
-       dh_install dgate /usr/lib/cgi-bin
-       dh_install dicom.sql /usr/lib/cgi-bin
-       dh_install dicom.ini.www /usr/lib/cgi-bin/dicom.ini
-       dh_install sample.cq /usr/lib/cgi-bin
+       dh_install dgate       /usr/lib/conquest-dicom-server/
+       dh_install dgate.dic   /usr/lib/conquest-dicom-server/
+       dh_install dicom.sql   /usr/lib/conquest-dicom-server/
+       dh_install dicom.ini   /usr/lib/conquest-dicom-server/
+       dh_install sample.cq   /usr/lib/conquest-dicom-server/
+       dh_install acrnema.map /usr/lib/conquest-dicom-server/
        #dh_install ActiveFormProj1.ocx /var/www
-       dh_install conquest.jpg /var/www
+       #dh_install conquest.jpg /var/www
        # added (MM)
-       dh_install dgate.dic /usr/lib/cgi-bin
+
+override_dh_clean:
+       (cd jpeg-6c && $(MAKE) clean)
+       -(cd jasper-1.900.1-6ct && $(MAKE) clean)
+       -rm dgate
 
 override_dh_auto_clean:
        dh_clean dicom.ini

-- 
Alioth's /git/debian-med/git-commit-notice on 
/srv/git.debian.org/git/debian-med/conquest-dicom-server.git

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to