Author: jodogne-guest Date: 2012-10-08 13:42:52 +0000 (Mon, 08 Oct 2012) New Revision: 12336
Added: trunk/packages/orthanc/trunk/debian/changelog trunk/packages/orthanc/trunk/debian/compat trunk/packages/orthanc/trunk/debian/configuration/ trunk/packages/orthanc/trunk/debian/configuration/orthanc.json trunk/packages/orthanc/trunk/debian/control trunk/packages/orthanc/trunk/debian/copyright trunk/packages/orthanc/trunk/debian/docs/ trunk/packages/orthanc/trunk/debian/docs/orthanc.1 trunk/packages/orthanc/trunk/debian/install trunk/packages/orthanc/trunk/debian/orthanc.dirs trunk/packages/orthanc/trunk/debian/orthanc.init trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides trunk/packages/orthanc/trunk/debian/orthanc.manpages trunk/packages/orthanc/trunk/debian/patches/ trunk/packages/orthanc/trunk/debian/patches/disable-unit-tests trunk/packages/orthanc/trunk/debian/patches/dynamic-jsoncpp trunk/packages/orthanc/trunk/debian/patches/dynamic-sqlite trunk/packages/orthanc/trunk/debian/patches/fix-explorer-case trunk/packages/orthanc/trunk/debian/patches/jsoncpp-fixes trunk/packages/orthanc/trunk/debian/patches/series trunk/packages/orthanc/trunk/debian/postinst trunk/packages/orthanc/trunk/debian/postrm trunk/packages/orthanc/trunk/debian/rules trunk/packages/orthanc/trunk/debian/source/ trunk/packages/orthanc/trunk/debian/source/format trunk/packages/orthanc/trunk/debian/source/include-binaries Log: initial commit Added: trunk/packages/orthanc/trunk/debian/changelog =================================================================== --- trunk/packages/orthanc/trunk/debian/changelog (rev 0) +++ trunk/packages/orthanc/trunk/debian/changelog 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,11 @@ +orthanc (0.2.2-6) unstable; urgency=low + + * New upstream version. + + -- Sebastien Jodogne <[email protected]> Thu, 04 Oct 2012 12:47:52 +0200 + +orthanc (0.2.1-7) unstable; urgency=low + + * Initial release. (Closes: #689029) + + -- Sebastien Jodogne <[email protected]> Wed, 26 Sep 2012 14:58:57 +0200 Added: trunk/packages/orthanc/trunk/debian/compat =================================================================== --- trunk/packages/orthanc/trunk/debian/compat (rev 0) +++ trunk/packages/orthanc/trunk/debian/compat 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1 @@ +9 Added: trunk/packages/orthanc/trunk/debian/configuration/orthanc.json =================================================================== --- trunk/packages/orthanc/trunk/debian/configuration/orthanc.json (rev 0) +++ trunk/packages/orthanc/trunk/debian/configuration/orthanc.json 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,71 @@ +{ + /** + * General configuration of Orthanc + **/ + + // Path to the directory that holds the database + "StorageDirectory" : "/var/lib/orthanc/0.2.2", + + + + /** + * Configuration of the HTTP server + **/ + + // HTTP port for the REST services and for the GUI + "HttpPort" : 8042, + + + + /** + * Configuration of the DICOM server + **/ + + // The DICOM Application Entity Title + "DicomAet" : "ORTHANC", + + // Check whether the called AET corresponds during a DICOM request + "DicomCheckCalledAet" : false, + + // The DICOM port + "DicomPort" : 4242, + + + + /** + * Security-related options + **/ + + // Whether remote hosts can connect to the HTTP server + "RemoteAccessAllowed" : false, + + // Whether or not SSL is enabled + "SslEnabled" : false, + + // Path to the SSL certificate + "SslCertificate" : "certificate.pem", + + // Whether or not the password protection is enabled + "AuthenticationEnabled" : false, + + // The list of the registered users. Because Orthanc uses HTTP + // Basic Authentication, the passwords are stored as plain text. + "RegisteredUsers" : { + "alice" : "alicePassword" + }, + + + + /** + * Network topology + **/ + + // The list of the known DICOM modalities + "DicomModalities" : { + // "sample" : [ "SAMPLESCP", "192.168.100.42", 104 ] + }, + + // The list of the known Orthanc peers (currently unused) + "OrthancPeers" : { + } +} Added: trunk/packages/orthanc/trunk/debian/control =================================================================== --- trunk/packages/orthanc/trunk/debian/control (rev 0) +++ trunk/packages/orthanc/trunk/debian/control 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,27 @@ +Source: orthanc +Maintainer: Sebastien Jodogne <[email protected]> +Section: science +Priority: optional +Standards-Version: 3.9.3 +Homepage: https://code.google.com/p/orthanc/ +Build-Depends: debhelper (>= 9), cmake (>= 2.8), initscripts (>= 2.88dsf-13.3), unzip, uuid-dev, libssl-dev, zlib1g-dev, libpng-dev, libboost-all-dev, libwrap0-dev, libgoogle-glog-dev, libcurl4-gnutls-dev | libcurl4-dev, libdcmtk2-dev, libsqlite3-dev, libjsoncpp-dev + +Package: orthanc +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, dcmtk +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. + . + 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. Added: trunk/packages/orthanc/trunk/debian/copyright =================================================================== --- trunk/packages/orthanc/trunk/debian/copyright (rev 0) +++ trunk/packages/orthanc/trunk/debian/copyright 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,102 @@ +Name: orthanc +Maintainer: Sebastien Jodogne <[email protected]> +Source: https://code.google.com/p/orthanc/ + +Files: * +Copyright: 2012 CHU of Liege (Belgium) and Sebastien Jodogne <[email protected]> +License: GPL-3 with OpenSSL exception + +Files: debian/* +Copyright: 2012 CHU of Liege (Belgium) and Sebastien Jodogne <[email protected]> +License: GPL-3 with OpenSSL exception + +Files: ThirdPartyDownloads/mongoose-3.1.tgz +Copyright: Copyright (c) 2004-2010 Sergey Lyubka +License: MIT + +Files: Core/SQLite/* +Copyright: 2012 CHU of Liege (Belgium) and Sebastien Jodogne <[email protected]>, and 2012 The Chromium Authors +License: BSD + +Files: OrthancCppClient/* +Copyright: 2012 CHU of Liege (Belgium) and Sebastien Jodogne <[email protected]> +License: MIT + +License: GPL-3 with OpenSSL exception + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + . + In addition, as a special exception, the author of this program gives + permission to link the code of its release with the OpenSSL project's + "OpenSSL" library (or with modified versions of it that use the same + license as the "OpenSSL" library), and distribute the linked + executables. You must obey the GNU General Public License in all + respects for all of the code used other than "OpenSSL". If you + modify this file, you may extend this exception to your version of + the file, but you are not obligated to do so. If you do not wish to + do so, delete this exception statement from your version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public License along + with this package; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + . + On Debian systems, the full text of the GNU General Public License + version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +License: BSD + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + * Neither the name of Google Inc., the name of the CHU of Liege, nor + the names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: trunk/packages/orthanc/trunk/debian/docs/orthanc.1 =================================================================== --- trunk/packages/orthanc/trunk/debian/docs/orthanc.1 (rev 0) +++ trunk/packages/orthanc/trunk/debian/docs/orthanc.1 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,21 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.12. +.TH ORTHANC "1" "October 2012" "orthanc 0.2.2" "User Commands" +.SH NAME +orthanc \- Lightweight, RESTful DICOM server for healthcare and medical research +.SH SYNOPSIS +.B orthanc +[\fIOPTION\fR]... [\fICONFIGURATION\fR] +.SH DESCRIPTION +Start Orthanc, a lightweight, RESTful DICOM server for healthcare and medical research. +.PP +If no configuration file is given on the command line, a set of default parameters +is used. Please refer to the Orthanc homepage for the full instructions about how to use Orthanc +<https://code.google.com/p/orthanc/wiki/OrthancCookbook>. +.SH AUTHOR +Written by Sebastien Jodogne <[email protected]> +.SH COPYRIGHT +Copyright \(co 2012 Medical Physics Department, CHU of Liege (Belgium) +Licensing GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>, with OpenSSL exception. +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. Added: trunk/packages/orthanc/trunk/debian/install =================================================================== --- trunk/packages/orthanc/trunk/debian/install (rev 0) +++ trunk/packages/orthanc/trunk/debian/install 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1 @@ +debian/configuration/orthanc.json etc/orthanc Added: trunk/packages/orthanc/trunk/debian/orthanc.dirs =================================================================== --- trunk/packages/orthanc/trunk/debian/orthanc.dirs (rev 0) +++ trunk/packages/orthanc/trunk/debian/orthanc.dirs 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,5 @@ +etc/init.d +etc/orthanc +usr/bin +usr/share/doc/orthanc +var/lib/orthanc Added: trunk/packages/orthanc/trunk/debian/orthanc.init =================================================================== --- trunk/packages/orthanc/trunk/debian/orthanc.init (rev 0) +++ trunk/packages/orthanc/trunk/debian/orthanc.init 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,160 @@ +#! /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 <[email protected]> + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Orthanc" +NAME=orthanc +DAEMON=/usr/bin/$NAME +LOGDIR=/var/log/orthanc +DAEMON_ARGS="--logdir=$LOGDIR /etc/orthanc/orthanc.json" +PIDFILE=/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +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 + +: Added: trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides =================================================================== --- trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides (rev 0) +++ trunk/packages/orthanc/trunk/debian/orthanc.lintian-overrides 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,2 @@ +# The following overrides a misspelling in jQuery File Upload +spelling-error-in-binary usr/bin/orthanc allows to allows one to Added: trunk/packages/orthanc/trunk/debian/orthanc.manpages =================================================================== --- trunk/packages/orthanc/trunk/debian/orthanc.manpages (rev 0) +++ trunk/packages/orthanc/trunk/debian/orthanc.manpages 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1 @@ +debian/docs/orthanc.1 Added: trunk/packages/orthanc/trunk/debian/patches/disable-unit-tests =================================================================== --- trunk/packages/orthanc/trunk/debian/patches/disable-unit-tests (rev 0) +++ trunk/packages/orthanc/trunk/debian/patches/disable-unit-tests 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,56 @@ +Description: Disabling of unit tests for Debian release +Author: Sebastien Jodogne <[email protected]> + +Index: Orthanc-0.2.2/CMakeLists.txt +=================================================================== +--- Orthanc-0.2.2.orig/CMakeLists.txt 2012-10-04 17:55:36.163510466 +0200 ++++ Orthanc-0.2.2/CMakeLists.txt 2012-10-04 17:55:43.343510285 +0200 +@@ -9,6 +9,7 @@ + SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)") + SET(STANDALONE_BUILD OFF CACHE BOOL "Standalone build (necessary for cross-compilation or binary releases)") + SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL") ++SET(BUILD_UNIT_TESTS ON CACHE BOOL "Build the unit tests") + SET(DEBIAN_HARDENING OFF CACHE BOOL "Use Debian hardening flags") + + if (${CMAKE_CROSSCOMPILING}) +@@ -42,7 +43,6 @@ + + include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) +-include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) +@@ -208,17 +208,22 @@ + OrthancServer/main.cpp + ) + +-add_executable(UnitTests +- ${GTEST_SOURCES} +- UnitTests/main.cpp +- UnitTests/SQLite.cpp +- UnitTests/SQLiteChromium.cpp +- UnitTests/Versions.cpp +- UnitTests/Zip.cpp +- ) +- + TARGET_LINK_LIBRARIES(Orthanc ServerLibrary CoreLibrary) +-TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary) ++ ++ ++if (BUILD_UNIT_TESTS) ++ include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) ++ add_executable(UnitTests ++ ${GTEST_SOURCES} ++ UnitTests/main.cpp ++ UnitTests/SQLite.cpp ++ UnitTests/SQLiteChromium.cpp ++ UnitTests/Versions.cpp ++ UnitTests/Zip.cpp ++ ) ++ TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary) ++endif() ++ + + find_package(Doxygen) + if (DOXYGEN_FOUND) Added: trunk/packages/orthanc/trunk/debian/patches/dynamic-jsoncpp =================================================================== --- trunk/packages/orthanc/trunk/debian/patches/dynamic-jsoncpp (rev 0) +++ trunk/packages/orthanc/trunk/debian/patches/dynamic-jsoncpp 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,58 @@ +Description: Dynamic linking against JsonCpp +Author: Sebastien Jodogne <[email protected]> + +Index: Orthanc-0.2.2/CMakeLists.txt +=================================================================== +--- Orthanc-0.2.2.orig/CMakeLists.txt 2012-10-05 15:31:17.000000000 +0200 ++++ Orthanc-0.2.2/CMakeLists.txt 2012-10-05 15:32:18.935692006 +0200 +@@ -11,6 +11,7 @@ + SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL") + SET(BUILD_UNIT_TESTS ON CACHE BOOL "Build the unit tests") + SET(DEBIAN_HARDENING OFF CACHE BOOL "Use Debian hardening flags") ++SET(USE_DYNAMIC_JSONCPP OFF CACHE BOOL "Use the dynamic version of JsonCpp, only for Debian Unstable") + + if (${CMAKE_CROSSCOMPILING}) + SET(STANDALONE_BUILD ON) +Index: Orthanc-0.2.2/Resources/CMake/JsonCppConfiguration.cmake +=================================================================== +--- Orthanc-0.2.2.orig/Resources/CMake/JsonCppConfiguration.cmake 2012-10-04 15:09:56.000000000 +0200 ++++ Orthanc-0.2.2/Resources/CMake/JsonCppConfiguration.cmake 2012-10-08 12:22:36.044396865 +0200 +@@ -1,14 +1,26 @@ +-SET(JSONCPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/jsoncpp-src-0.5.0) +-DownloadPackage("http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/0.5.0/jsoncpp-src-0.5.0.tar.gz" "${JSONCPP_SOURCES_DIR}" "" "") ++if (USE_DYNAMIC_JSONCPP) ++ CHECK_INCLUDE_FILE_CXX(jsoncpp/json/reader.h HAVE_JSONCPP_H) ++ if (NOT HAVE_JSONCPP_H) ++ message(FATAL_ERROR "Please install the libjsoncpp-dev package") ++ endif() + +-list(APPEND THIRD_PARTY_SOURCES +- ${JSONCPP_SOURCES_DIR}/src/lib_json/json_reader.cpp +- ${JSONCPP_SOURCES_DIR}/src/lib_json/json_value.cpp +- ${JSONCPP_SOURCES_DIR}/src/lib_json/json_writer.cpp +- ) +- +-include_directories( +- ${JSONCPP_SOURCES_DIR}/include +- ) ++ include_directories(/usr/include/jsoncpp) ++ link_libraries(jsoncpp) ++ ++else() ++ SET(JSONCPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/jsoncpp-src-0.5.0) ++ DownloadPackage("http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/0.5.0/jsoncpp-src-0.5.0.tar.gz" "${JSONCPP_SOURCES_DIR}" "" "") ++ ++ list(APPEND THIRD_PARTY_SOURCES ++ ${JSONCPP_SOURCES_DIR}/src/lib_json/json_reader.cpp ++ ${JSONCPP_SOURCES_DIR}/src/lib_json/json_value.cpp ++ ${JSONCPP_SOURCES_DIR}/src/lib_json/json_writer.cpp ++ ) ++ ++ include_directories( ++ ${JSONCPP_SOURCES_DIR}/include ++ ) ++ ++ source_group(ThirdParty\\JsonCpp REGULAR_EXPRESSION ${JSONCPP_SOURCES_DIR}/.*) ++endif() + +-source_group(ThirdParty\\JsonCpp REGULAR_EXPRESSION ${JSONCPP_SOURCES_DIR}/.*) Added: trunk/packages/orthanc/trunk/debian/patches/dynamic-sqlite =================================================================== --- trunk/packages/orthanc/trunk/debian/patches/dynamic-sqlite (rev 0) +++ trunk/packages/orthanc/trunk/debian/patches/dynamic-sqlite 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,52 @@ +Description: Dynamic linking against SQLite +Author: Sebastien Jodogne <[email protected]> + +Index: Orthanc-0.2.2/Resources/CMake/SQLiteConfiguration.cmake +=================================================================== +--- Orthanc-0.2.2.orig/Resources/CMake/SQLiteConfiguration.cmake 2012-10-05 14:06:33.893675067 +0200 ++++ Orthanc-0.2.2/Resources/CMake/SQLiteConfiguration.cmake 2012-10-05 14:06:46.449674749 +0200 +@@ -1,19 +1,28 @@ +-SET(SQLITE_SOURCES_DIR ${CMAKE_BINARY_DIR}/sqlite-amalgamation-3071300) +-DownloadPackage("http://www.sqlite.org/sqlite-amalgamation-3071300.zip" "${SQLITE_SOURCES_DIR}" "" "") ++if (${STATIC_BUILD}) ++ SET(SQLITE_SOURCES_DIR ${CMAKE_BINARY_DIR}/sqlite-amalgamation-3071300) ++ DownloadPackage("http://www.sqlite.org/sqlite-amalgamation-3071300.zip" "${SQLITE_SOURCES_DIR}" "" "") + +-list(APPEND THIRD_PARTY_SOURCES +- ${SQLITE_SOURCES_DIR}/sqlite3.c +- ) ++ list(APPEND THIRD_PARTY_SOURCES ++ ${SQLITE_SOURCES_DIR}/sqlite3.c ++ ) + +-add_definitions( +- # For SQLite to run in the "Serialized" thread-safe mode +- # http://www.sqlite.org/threadsafe.html +- -DSQLITE_THREADSAFE=1 +- -DSQLITE_OMIT_LOAD_EXTENSION # Disable SQLite plugins +- ) ++ add_definitions( ++ # For SQLite to run in the "Serialized" thread-safe mode ++ # http://www.sqlite.org/threadsafe.html ++ -DSQLITE_THREADSAFE=1 ++ -DSQLITE_OMIT_LOAD_EXTENSION # Disable SQLite plugins ++ ) + +-include_directories( +- ${SQLITE_SOURCES_DIR} +- ) ++ include_directories( ++ ${SQLITE_SOURCES_DIR} ++ ) + +-source_group(ThirdParty\\SQLite REGULAR_EXPRESSION ${SQLITE_SOURCES_DIR}/.*) +\ No newline at end of file ++ source_group(ThirdParty\\SQLite REGULAR_EXPRESSION ${SQLITE_SOURCES_DIR}/.*) ++else() ++ CHECK_INCLUDE_FILE_CXX(sqlite3.h HAVE_SQLITE_H) ++ if (NOT HAVE_SQLITE_H) ++ message(FATAL_ERROR "Please install the libsqlite3-dev package") ++ endif() ++ ++ link_libraries(sqlite3) ++endif() Added: trunk/packages/orthanc/trunk/debian/patches/fix-explorer-case =================================================================== --- trunk/packages/orthanc/trunk/debian/patches/fix-explorer-case (rev 0) +++ trunk/packages/orthanc/trunk/debian/patches/fix-explorer-case 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,29 @@ +Description: Fix in the case of two files +Author: Sebastien Jodogne <[email protected]> + +Index: Orthanc-0.2.2/OrthancExplorer/explorer.html +=================================================================== +--- Orthanc-0.2.2.orig/OrthancExplorer/explorer.html 2012-10-04 15:09:56.000000000 +0200 ++++ Orthanc-0.2.2/OrthancExplorer/explorer.html 2012-10-06 15:42:28.314864578 +0200 +@@ -20,7 +20,7 @@ + <script src="libs/date.js"></script> + <script src="libs/jquery.mobile.simpledialog2.js"></script> + <script src="libs/slimbox2.js"></script> +- <script src="libs/jquery.blockUI.js"></script> ++ <script src="libs/jquery.blockui.js"></script> + + <!-- https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin --> + <script src="libs/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script> +Index: Orthanc-0.2.2/OrthancServer/OrthancRestApi.cpp +=================================================================== +--- Orthanc-0.2.2.orig/OrthancServer/OrthancRestApi.cpp 2012-10-04 15:09:56.000000000 +0200 ++++ Orthanc-0.2.2/OrthancServer/OrthancRestApi.cpp 2012-10-06 16:07:17.348308436 +0200 +@@ -661,7 +661,7 @@ + root += "../"; + } + +- output.Redirect(root + "app/images/Unsupported.png"); ++ output.Redirect(root + "app/images/unsupported.png"); + return; + } + } Added: trunk/packages/orthanc/trunk/debian/patches/jsoncpp-fixes =================================================================== --- trunk/packages/orthanc/trunk/debian/patches/jsoncpp-fixes (rev 0) +++ trunk/packages/orthanc/trunk/debian/patches/jsoncpp-fixes 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,25 @@ +Description: Fixes for JsonCpp 0.6.0 +Author: Sebastien Jodogne <[email protected]> + +Index: Orthanc-0.2.2/OrthancServer/OrthancRestApi.cpp +=================================================================== +--- Orthanc-0.2.2.orig/OrthancServer/OrthancRestApi.cpp 2012-10-04 15:09:56.000000000 +0200 ++++ Orthanc-0.2.2/OrthancServer/OrthancRestApi.cpp 2012-10-05 15:48:16.574244378 +0200 +@@ -68,7 +68,7 @@ + assert(array.isArray()); + + Json::Value children = Json::arrayValue; +- for (size_t i = 0; i < array.size(); i++) ++ for (Json::Value::ArrayIndex i = 0; i < array.size(); i++) + { + Json::Value c; + SimplifyTagsRecursion(c, array[i]); +@@ -339,7 +339,7 @@ + else if (index_.GetSeries(found, postData)) + { + // The UUID corresponds to a series +- for (size_t i = 0; i < found["Instances"].size(); i++) ++ for (Json::Value::ArrayIndex i = 0; i < found["Instances"].size(); i++) + { + std::string uuid = found["Instances"][i].asString(); + Json::Value instance(Json::objectValue); Added: trunk/packages/orthanc/trunk/debian/patches/series =================================================================== --- trunk/packages/orthanc/trunk/debian/patches/series (rev 0) +++ trunk/packages/orthanc/trunk/debian/patches/series 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,5 @@ +disable-unit-tests +dynamic-sqlite +dynamic-jsoncpp +jsoncpp-fixes +fix-explorer-case Added: trunk/packages/orthanc/trunk/debian/postinst =================================================================== --- trunk/packages/orthanc/trunk/debian/postinst (rev 0) +++ trunk/packages/orthanc/trunk/debian/postinst 2012-10-08 13:42:52 UTC (rev 12336) @@ -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# Property changes on: trunk/packages/orthanc/trunk/debian/postinst ___________________________________________________________________ Added: svn:executable + * Added: trunk/packages/orthanc/trunk/debian/postrm =================================================================== --- trunk/packages/orthanc/trunk/debian/postrm (rev 0) +++ trunk/packages/orthanc/trunk/debian/postrm 2012-10-08 13:42:52 UTC (rev 12336) @@ -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# Property changes on: trunk/packages/orthanc/trunk/debian/postrm ___________________________________________________________________ Added: svn:executable + * Added: trunk/packages/orthanc/trunk/debian/rules =================================================================== --- trunk/packages/orthanc/trunk/debian/rules (rev 0) +++ trunk/packages/orthanc/trunk/debian/rules 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +%: + dh $@ --parallel --builddirectory=Build + + +override_dh_auto_configure: +# This fixes an error in the case of two filenames + if [ -f $(CURDIR)/OrthancExplorer/libs/jquery.blockUI.js ]; then \ + mv $(CURDIR)/OrthancExplorer/libs/jquery.blockUI.js \ + $(CURDIR)/OrthancExplorer/libs/jquery.blockui.js; \ + fi + if [ -f $(CURDIR)/OrthancExplorer/images/Unsupported.png ]; then \ + mv $(CURDIR)/OrthancExplorer/images/Unsupported.png \ + $(CURDIR)/OrthancExplorer/images/unsupported.png; \ + fi + + dh_auto_configure -- -DDEBIAN_HARDENING=ON -DSTATIC_BUILD=OFF -DSTANDALONE_BUILD=ON -DBUILD_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DUSE_DYNAMIC_JSONCPP=1 + + +override_dh_auto_install: + cp $(CURDIR)/Build/Orthanc $(CURDIR)/debian/orthanc/usr/bin/orthanc + gzip -c -9 $(CURDIR)/NEWS > $(CURDIR)/debian/orthanc/usr/share/doc/orthanc/changelog.gz Property changes on: trunk/packages/orthanc/trunk/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: trunk/packages/orthanc/trunk/debian/source/format =================================================================== --- trunk/packages/orthanc/trunk/debian/source/format (rev 0) +++ trunk/packages/orthanc/trunk/debian/source/format 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1 @@ +3.0 (quilt) Added: trunk/packages/orthanc/trunk/debian/source/include-binaries =================================================================== --- trunk/packages/orthanc/trunk/debian/source/include-binaries (rev 0) +++ trunk/packages/orthanc/trunk/debian/source/include-binaries 2012-10-08 13:42:52 UTC (rev 12336) @@ -0,0 +1,3 @@ +ThirdPartyDownloads/mongoose-3.1.tgz +ThirdPartyDownloads/sqlite-amalgamation-3071300.zip +ThirdPartyDownloads/jsoncpp-src-0.5.0.tar.gz _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
