[med-svn] r11561 - in trunk/packages/conquest-dicom-server/trunk/debian: . patches
Mathieu Malaterre
malat at alioth.debian.org
Thu Jul 5 08:15:26 UTC 2012
Author: malat
Date: 2012-07-05 08:15:25 +0000 (Thu, 05 Jul 2012)
New Revision: 11561
Added:
trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.dirs
trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.init
trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.postinst
trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.prerm
trunk/packages/conquest-dicom-server/trunk/debian/patches/debianlayout.patch
Modified:
trunk/packages/conquest-dicom-server/trunk/debian/patches/series
trunk/packages/conquest-dicom-server/trunk/debian/rules
Log:
Install deamon
Added: trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.dirs
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.dirs (rev 0)
+++ trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.dirs 2012-07-05 08:15:25 UTC (rev 11561)
@@ -0,0 +1 @@
+/var/lib/conquest-dicom-server/data/dbase/
Added: trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.init
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.init (rev 0)
+++ trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.init 2012-07-05 08:15:25 UTC (rev 11561)
@@ -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 <malat at debian.org>
+
+# 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
+
+:
Property changes on: trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.init
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.postinst
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.postinst (rev 0)
+++ trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.postinst 2012-07-05 08:15:25 UTC (rev 11561)
@@ -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
+
Added: trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.prerm
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.prerm (rev 0)
+++ trunk/packages/conquest-dicom-server/trunk/debian/conquest-dicom-server.prerm 2012-07-05 08:15:25 UTC (rev 11561)
@@ -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
+
Added: trunk/packages/conquest-dicom-server/trunk/debian/patches/debianlayout.patch
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/patches/debianlayout.patch (rev 0)
+++ trunk/packages/conquest-dicom-server/trunk/debian/patches/debianlayout.patch 2012-07-05 08:15:25 UTC (rev 11561)
@@ -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 <malat at debian.org>
+
+---
+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/
Modified: trunk/packages/conquest-dicom-server/trunk/debian/patches/series
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/patches/series 2012-07-05 07:41:54 UTC (rev 11560)
+++ trunk/packages/conquest-dicom-server/trunk/debian/patches/series 2012-07-05 08:15:25 UTC (rev 11561)
@@ -1 +1,2 @@
fix_int32.patch
+debianlayout.patch
Modified: trunk/packages/conquest-dicom-server/trunk/debian/rules
===================================================================
--- trunk/packages/conquest-dicom-server/trunk/debian/rules 2012-07-05 07:41:54 UTC (rev 11560)
+++ trunk/packages/conquest-dicom-server/trunk/debian/rules 2012-07-05 08:15:25 UTC (rev 11561)
@@ -1,36 +1,46 @@
#!/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
dh_clean dicom.sql
More information about the debian-med-commit
mailing list