[med-svn] r18901 - in trunk/packages/orthanc/trunk/debian: . docs
Sebastien Jodogne
jodogne-guest at moszumanska.debian.org
Wed Mar 4 08:46:41 UTC 2015
Author: jodogne-guest
Date: 2015-03-04 08:46:36 +0000 (Wed, 04 Mar 2015)
New Revision: 18901
Added:
trunk/packages/orthanc/trunk/debian/docs/index.html
trunk/packages/orthanc/trunk/debian/orthanc-dev.dirs
trunk/packages/orthanc/trunk/debian/orthanc-dev.install
trunk/packages/orthanc/trunk/debian/orthanc-doc.README.Debian
trunk/packages/orthanc/trunk/debian/orthanc-doc.dirs
trunk/packages/orthanc/trunk/debian/orthanc-doc.doc-base
trunk/packages/orthanc/trunk/debian/orthanc-doc.install
trunk/packages/orthanc/trunk/debian/orthanc-sqlite.dirs
trunk/packages/orthanc/trunk/debian/orthanc-sqlite.init
trunk/packages/orthanc/trunk/debian/orthanc-sqlite.install
trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postinst
trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postrm
Removed:
trunk/packages/orthanc/trunk/debian/install
trunk/packages/orthanc/trunk/debian/orthanc.init
trunk/packages/orthanc/trunk/debian/postinst
trunk/packages/orthanc/trunk/debian/postrm
Modified:
trunk/packages/orthanc/trunk/debian/changelog
trunk/packages/orthanc/trunk/debian/control
trunk/packages/orthanc/trunk/debian/liborthancclient-dev.install
trunk/packages/orthanc/trunk/debian/liborthancclient-doc.install
trunk/packages/orthanc/trunk/debian/orthanc.dirs
trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides
trunk/packages/orthanc/trunk/debian/rules
Log:
New packages: orthanc-dev, orthanc-doc and orthanc-sqlite
Modified: trunk/packages/orthanc/trunk/debian/changelog
===================================================================
--- trunk/packages/orthanc/trunk/debian/changelog 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/changelog 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,3 +1,9 @@
+orthanc (0.8.6+dfsg-2) UNRELEASED; urgency=medium
+
+ * New packages: orthanc-dev, orthanc-doc and orthanc-sqlite
+
+ -- Sebastien Jodogne <s.jodogne at gmail.com> Tue, 03 Mar 2015 11:11:05 +0100
+
orthanc (0.8.6+dfsg-1) experimental; urgency=medium
* New upstream version
@@ -159,7 +165,7 @@
* Handle RGB DICOM. Closes: #698417
[ Mathieu Malaterre ]
- * Remove patches applied upstrea:
+ * Remove patches applied upstream:
+ debian/patches/cmake-new-platforms
+ debian/patches/freebsd-hurd-fixes
Modified: trunk/packages/orthanc/trunk/debian/control
===================================================================
--- trunk/packages/orthanc/trunk/debian/control 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/control 2015-03-04 08:46:36 UTC (rev 18901)
@@ -33,13 +33,17 @@
Package: orthanc
Architecture: any
-Depends: adduser, dcmtk, ${misc:Depends}, ${shlibs:Depends}
-Description: RESTful DICOM server for healthcare and medical research
- Orthanc aims at providing a simple, yet powerful standalone DICOM
- server. Orthanc can turn any computer running Windows or Linux into a
- DICOM store (in other words, a mini-PACS system). Its architecture is
- lightweight, meaning that no complex database administration is
- required, nor the installation of third-party dependencies.
+Depends: dcmtk,
+ ${misc:Depends},
+ ${shlibs:Depends},
+ orthanc-sqlite (= ${binary:Version}) | orthanc-postgresql
+Description: Lightweight, RESTful Vendor Neutral Archive for medical imaging
+ Orthanc aims at providing a simple, yet powerful DICOM server for
+ medical imaging. Orthanc can turn any computer running Windows or
+ Linux into a Vendor Neutral Archive (in other words, a mini-PACS
+ system). Its architecture is lightweight, meaning that no complex
+ database administration is required, nor the installation of
+ third-party dependencies.
.
What makes Orthanc unique is the fact that it provides a RESTful
API. Thanks to this major feature, it is possible to drive Orthanc
@@ -51,10 +55,58 @@
Orthanc lets its users focus on the content of the DICOM files,
hiding the complexity of the DICOM format and of the DICOM protocol.
+Package: orthanc-sqlite
+Architecture: any
+Depends: adduser, ${misc:Depends}
+Conflicts: orthanc-postgresql
+Description: SQLite back-end for Orthanc
+ Orthanc aims at providing a simple, yet powerful DICOM server for
+ medical imaging. Orthanc can turn any computer running Windows or
+ Linux into a Vendor Neutral Archive (in other words, a mini-PACS
+ system). Its architecture is lightweight, meaning that no complex
+ database administration is required, nor the installation of
+ third-party dependencies.
+ .
+ This package makes Orthanc use the default SQLite database back-end
+ to store its index. Orthanc will also store the DICOM files directly
+ on the filesystem.
+
+Package: orthanc-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Description: Documentation of Orthanc
+ Orthanc aims at providing a simple, yet powerful DICOM server for
+ medical imaging. Orthanc can turn any computer running Windows or
+ Linux into a Vendor Neutral Archive (in other words, a mini-PACS
+ system). Its architecture is lightweight, meaning that no complex
+ database administration is required, nor the installation of
+ third-party dependencies.
+ .
+ This package includes the documentation and the sample codes
+ available for Orthanc. It also includes the documentation
+ to develop C/C++ plugins for Orthanc.
+
+Package: orthanc-dev
+Architecture: any
+Section: libdevel
+Depends: ${misc:Depends}
+Description: Orthanc development files
+ Orthanc aims at providing a simple, yet powerful DICOM server for
+ medical imaging. Orthanc can turn any computer running Windows or
+ Linux into a Vendor Neutral Archive (in other words, a mini-PACS
+ system). Its architecture is lightweight, meaning that no complex
+ database administration is required, nor the installation of
+ third-party dependencies.
+ .
+ This package includes the header files to develop C/C++ plugins
+ for Orthanc.
+
Package: liborthancclient0.8
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: orthanc (= ${binary:Version})
Description: Orthanc Client runtime library
Orthanc Client is a library to access the content of a remote
instance of Orthanc. Orthanc is a lightweight, RESTful DICOM server
Added: trunk/packages/orthanc/trunk/debian/docs/index.html
===================================================================
--- trunk/packages/orthanc/trunk/debian/docs/index.html (rev 0)
+++ trunk/packages/orthanc/trunk/debian/docs/index.html 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <h1>Index of the Orthanc documentation</h1>
+
+ <ul>
+ <li><a href="OrthancPlugin/index.html">Plugin SDK</a> to develop plugins for Orthanc.</li>
+ </ul>
+ </body>
+</html>
Deleted: trunk/packages/orthanc/trunk/debian/install
===================================================================
--- trunk/packages/orthanc/trunk/debian/install 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/install 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1 +0,0 @@
-debian/configuration/orthanc.json etc/orthanc
Modified: trunk/packages/orthanc/trunk/debian/liborthancclient-dev.install
===================================================================
--- trunk/packages/orthanc/trunk/debian/liborthancclient-dev.install 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/liborthancclient-dev.install 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,5 +1,2 @@
usr/include/orthanc/OrthancCppClient.h
-usr/include/orthanc/OrthancCPlugin.h
-usr/include/orthanc/OrthancCDatabasePlugin.h
-usr/include/orthanc/OrthancCppDatabasePlugin.h
usr/lib/libOrthancClient.so
Modified: trunk/packages/orthanc/trunk/debian/liborthancclient-doc.install
===================================================================
--- trunk/packages/orthanc/trunk/debian/liborthancclient-doc.install 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/liborthancclient-doc.install 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,3 +1,2 @@
usr/share/doc/orthanc/OrthancClient/*
-usr/share/doc/orthanc/OrthancPlugin/*
usr/share/doc/orthanc/OrthancClientSamples/*
Added: trunk/packages/orthanc/trunk/debian/orthanc-dev.dirs
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-dev.dirs (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-dev.dirs 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1 @@
+usr/include/orthanc
Added: trunk/packages/orthanc/trunk/debian/orthanc-dev.install
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-dev.install (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-dev.install 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,3 @@
+usr/include/orthanc/OrthancCPlugin.h
+usr/include/orthanc/OrthancCDatabasePlugin.h
+usr/include/orthanc/OrthancCppDatabasePlugin.h
Added: trunk/packages/orthanc/trunk/debian/orthanc-doc.README.Debian
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-doc.README.Debian (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-doc.README.Debian 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,4 @@
+The index of the available documentation about Orthanc can be opened
+using the following command:
+
+$ xdg-open file:///usr/share/doc/orthanc/index.html
Added: trunk/packages/orthanc/trunk/debian/orthanc-doc.dirs
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-doc.dirs (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-doc.dirs 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1 @@
+usr/share/doc/orthanc
Added: trunk/packages/orthanc/trunk/debian/orthanc-doc.doc-base
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-doc.doc-base (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-doc.doc-base 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,26 @@
+Document: orthanc-doc
+Title: Documentation of Orthanc
+Author: Sebastien Jodogne <s.jodogne at gmail.com>
+Abstract: Lightweight, RESTful Vendor Neutral Archive for medical imaging
+ Orthanc aims at providing a simple, yet powerful DICOM server for
+ medical imaging. Orthanc can turn any computer running Windows or
+ Linux into a Vendor Neutral Archive (in other words, a mini-PACS
+ system). Its architecture is lightweight, meaning that no complex
+ database administration is required, nor the installation of
+ third-party dependencies.
+ .
+ What makes Orthanc unique is the fact that it provides a RESTful
+ API. Thanks to this major feature, it is possible to drive Orthanc
+ from any computer language. The DICOM tags of the stored medical
+ images can be downloaded in the JSON file format. Furthermore,
+ standard PNG images can be generated on-the-fly from the DICOM
+ instances by Orthanc.
+ .
+ Orthanc lets its users focus on the content of the DICOM files,
+ hiding the complexity of the DICOM format and of the DICOM protocol.
+Section: Science/Medicine
+
+Format: HTML
+Index: /usr/share/doc/orthanc/index.html
+Files: /usr/share/doc/orthanc/index.html
+ /usr/share/doc/orthanc/OrthancPlugin/*
Added: trunk/packages/orthanc/trunk/debian/orthanc-doc.install
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-doc.install (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-doc.install 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,2 @@
+usr/share/doc/orthanc/index.html
+usr/share/doc/orthanc/OrthancPlugin/*
Added: trunk/packages/orthanc/trunk/debian/orthanc-sqlite.dirs
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-sqlite.dirs (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-sqlite.dirs 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1 @@
+etc/init.d
Added: trunk/packages/orthanc/trunk/debian/orthanc-sqlite.init
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-sqlite.init (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-sqlite.init 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,164 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: orthanc
+# Required-Start: $local_fs $remote_fs $syslog
+# Required-Stop: $local_fs $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Orthanc init script
+# Description: Orthanc, a lightweight, RESTful DICOM server
+### END INIT INFO
+
+# Author: Sebastien Jodogne <s.jodogne at gmail.com>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+# You can modify the variables below
+DESC="Orthanc"
+NAME=Orthanc
+
+# Constants
+DAEMON=/usr/sbin/Orthanc
+LOGDIR=/var/log/orthanc
+DAEMON_ARGS="--logdir=${LOGDIR} /etc/orthanc/orthanc.json"
+PIDFILE=/run/orthanc.pid
+SCRIPTNAME=/etc/init.d/orthanc
+ORTHANC_USER=orthanc:orthanc
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# 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()
+{
+ # Prepare a directory to store the Orthanc logs
+ mkdir -p $LOGDIR
+ chown $ORTHANC_USER $LOGDIR
+
+ # Return
+ # 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 --chuid $ORTHANC_USER --background --exec $DAEMON --test > /dev/null \
+ || return 1
+
+ start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE --chuid $ORTHANC_USER --background --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+
+ # 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 --chuid $ORTHANC_USER --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 --quiet --oknodo --retry=0/1/KILL/5 --chuid $ORTHANC_USER --exec $DAEMON
+ [ "$?" = 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 --chuid $ORTHANC_USER --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
+
+:
Copied: trunk/packages/orthanc/trunk/debian/orthanc-sqlite.install (from rev 18898, trunk/packages/orthanc/trunk/debian/install)
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-sqlite.install (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-sqlite.install 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1 @@
+debian/configuration/orthanc.json etc/orthanc
Copied: trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postinst (from rev 18898, trunk/packages/orthanc/trunk/debian/postinst)
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postinst (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postinst 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+case $1 in
+ configure)
+ # Add the "orthanc" user
+ if ! getent passwd orthanc > /dev/null; then
+ adduser --system --quiet \
+ --home /var/lib/orthanc --no-create-home \
+ --shell /bin/bash --group --gecos "Orthanc Administrator" orthanc
+ fi
+ if test "`id -u orthanc`" -eq 0; then
+ echo "The orthanc administrative user must not be root." >&2
+ false
+ fi
+ if test "`id -g orthanc`" -eq 0; then
+ echo "The orthanc administrative group must not be root." >&2
+ false
+ fi
+
+ # Create the required directories
+ chown -R orthanc:orthanc /etc/orthanc
+ chown -R orthanc:orthanc /var/lib/orthanc
+ chmod 0775 /etc/orthanc
+ chmod 0775 /var/lib/orthanc
+
+ chmod 0664 /etc/orthanc/orthanc.json
+ ;;
+esac
+
+#DEBHELPER#
Copied: trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postrm (from rev 18898, trunk/packages/orthanc/trunk/debian/postrm)
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postrm (rev 0)
+++ trunk/packages/orthanc/trunk/debian/orthanc-sqlite.postrm 2015-03-04 08:46:36 UTC (rev 18901)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+VERSION=%VERSION%
+
+case $1 in
+ purge)
+ if test -d "/etc/orthanc"; then
+ rmdir --ignore-fail-on-non-empty "/etc/orthanc" || true
+ fi
+
+ # Remove the "orthanc" user
+ if getent passwd orthanc >/dev/null; then
+ if [ -x /usr/sbin/deluser ]; then
+ deluser --system orthanc
+ fi
+ fi
+ if getent group orthanc >/dev/null; then
+ if [ -x /usr/sbin/delgroup ]; then
+ delgroup --system orthanc
+ fi
+ fi
+esac
+
+#DEBHELPER#
Modified: trunk/packages/orthanc/trunk/debian/orthanc.dirs
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc.dirs 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/orthanc.dirs 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,4 +1,3 @@
-etc/init.d
etc/orthanc
usr/sbin
usr/share/doc/orthanc
Deleted: trunk/packages/orthanc/trunk/debian/orthanc.init
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc.init 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/orthanc.init 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,165 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: orthanc
-# Required-Start: $local_fs $remote_fs $syslog
-# Required-Stop: $local_fs $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Orthanc init script
-# Description: Orthanc, a lightweight, RESTful DICOM server
-### END INIT INFO
-
-# Author: Sebastien Jodogne <s.jodogne at gmail.com>
-
-# Do NOT "set -e"
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-
-# You can modify the variables below
-DESC="Orthanc"
-NAME=Orthanc
-
-# Auto-computed values
-NAME_LOWER_CASE=`echo "${NAME}" | tr '[A-Z]' '[a-z]'`
-DAEMON=/usr/sbin/${NAME}
-LOGDIR=/var/log/${NAME_LOWER_CASE}
-DAEMON_ARGS="--logdir=${LOGDIR} /etc/${NAME_LOWER_CASE}/${NAME_LOWER_CASE}.json"
-PIDFILE=/run/${NAME_LOWER_CASE}.pid
-SCRIPTNAME=/etc/init.d/${NAME_LOWER_CASE}
-ORTHANC_USER=${NAME_LOWER_CASE}:${NAME_LOWER_CASE}
-
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit 0
-
-# 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()
-{
- # Prepare a directory to store the Orthanc logs
- mkdir -p $LOGDIR
- chown $ORTHANC_USER $LOGDIR
-
- # Return
- # 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 --chuid $ORTHANC_USER --background --exec $DAEMON --test > /dev/null \
- || return 1
-
- start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE --chuid $ORTHANC_USER --background --exec $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-
- # 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 --chuid $ORTHANC_USER --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 --quiet --oknodo --retry=0/1/KILL/5 --chuid $ORTHANC_USER --exec $DAEMON
- [ "$?" = 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 --chuid $ORTHANC_USER --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
-
-:
Modified: trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides
===================================================================
--- trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides 2015-03-04 08:46:36 UTC (rev 18901)
@@ -4,3 +4,6 @@
# The following line overrides misspelling in "OrthancExplorer/libs/jquery.blockui.js"
spelling-error-in-binary usr/sbin/Orthanc supress suppress
+
+# By default, no Orthanc plugin is installed by the orthanc package
+package-contains-empty-directory usr/share/orthanc/plugins/
Deleted: trunk/packages/orthanc/trunk/debian/postinst
===================================================================
--- trunk/packages/orthanc/trunk/debian/postinst 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/postinst 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case $1 in
- configure)
- # Add the "orthanc" user
- if ! getent passwd orthanc > /dev/null; then
- adduser --system --quiet \
- --home /var/lib/orthanc --no-create-home \
- --shell /bin/bash --group --gecos "Orthanc Administrator" orthanc
- fi
- if test "`id -u orthanc`" -eq 0; then
- echo "The orthanc administrative user must not be root." >&2
- false
- fi
- if test "`id -g orthanc`" -eq 0; then
- echo "The orthanc administrative group must not be root." >&2
- false
- fi
-
- # Create the required directories
- chown -R orthanc:orthanc /etc/orthanc
- chown -R orthanc:orthanc /var/lib/orthanc
- chmod 0775 /etc/orthanc
- chmod 0775 /var/lib/orthanc
-
- chmod 0664 /etc/orthanc/orthanc.json
- ;;
-esac
-
-#DEBHELPER#
Deleted: trunk/packages/orthanc/trunk/debian/postrm
===================================================================
--- trunk/packages/orthanc/trunk/debian/postrm 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/postrm 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-set -e
-
-VERSION=%VERSION%
-
-case $1 in
- purge)
- if test -d "/etc/orthanc"; then
- rmdir --ignore-fail-on-non-empty "/etc/orthanc" || true
- fi
-
- # Remove the "orthanc" user
- if getent passwd orthanc >/dev/null; then
- if [ -x /usr/sbin/deluser ]; then
- deluser --system orthanc
- fi
- fi
- if getent group orthanc >/dev/null; then
- if [ -x /usr/sbin/delgroup ]; then
- delgroup --system orthanc
- fi
- fi
-esac
-
-#DEBHELPER#
Modified: trunk/packages/orthanc/trunk/debian/rules
===================================================================
--- trunk/packages/orthanc/trunk/debian/rules 2015-03-03 21:36:23 UTC (rev 18900)
+++ trunk/packages/orthanc/trunk/debian/rules 2015-03-04 08:46:36 UTC (rev 18901)
@@ -1,7 +1,8 @@
#!/usr/bin/make -f
export DESTDIR := $(CURDIR)/debian/tmp
-export CLIENT_SAMPLES_DIR := $(DESTDIR)/usr/share/doc/orthanc/OrthancClientSamples
+export DOC_DIR := $(DESTDIR)/usr/share/doc/orthanc
+export CLIENT_SAMPLES_DIR := $(DOC_DIR)/OrthancClientSamples
%:
dh $@ --parallel --builddirectory=Build
@@ -47,6 +48,10 @@
dh_clean
override_dh_auto_install:
+ # Move the Debian documentation
+ mkdir -p $(DOC_DIR)
+ cp debian/docs/index.html $(DOC_DIR)
+
# Move the samples of the Orthanc Client
mkdir -p $(CLIENT_SAMPLES_DIR)
cp -r Resources/Samples/OrthancClient/* $(CLIENT_SAMPLES_DIR)
@@ -56,6 +61,9 @@
# Move the Orthanc binaries to "/usr/sbin"
dh_install Build/Orthanc usr/sbin
+override_dh_installinit:
+ dh_installinit --name=orthanc
+
override_dh_installchangelogs:
dh_installchangelogs -k NEWS
More information about the debian-med-commit
mailing list