[med-svn] [Git][med-team/orthanc][master] 2 commits: packaging the Orthanc framework
Sebastien Jodogne
gitlab at salsa.debian.org
Wed Jul 22 09:57:45 BST 2020
Sebastien Jodogne pushed to branch master at Debian Med / orthanc
Commits:
474cab0a by jodogne-guest at 2020-07-22T10:03:29+02:00
packaging the Orthanc framework
- - - - -
5e3cab1a by jodogne-guest at 2020-07-22T10:56:59+02:00
Upload to unstable
- - - - -
10 changed files:
- debian/changelog
- debian/control
- + debian/liborthancframework-dev.dirs
- + debian/liborthancframework-dev.install
- + debian/liborthancframework1.install
- debian/orthanc.dirs
- debian/orthanc.install
- + debian/patches/series
- + debian/patches/soversion
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+orthanc (1.7.2+dfsg-2) unstable; urgency=medium
+
+ * Packaging the Orthanc Framework to share code between Orthanc plugins.
+
+ -- Sebastien Jodogne <s.jodogne at gmail.com> Wed, 22 Jul 2020 09:54:05 +0200
+
orthanc (1.7.2+dfsg-1) unstable; urgency=medium
* New upstream version
=====================================
debian/control
=====================================
@@ -35,7 +35,7 @@ Architecture: any
Depends: adduser,
dcmtk,
locales,
- lsb-base,
+ lsb-base,
${misc:Depends},
${shlibs:Depends}
Description: Lightweight, RESTful DICOM server for medical imaging
@@ -91,3 +91,36 @@ Description: Orthanc development files
.
This package includes the header files to develop C/C++ plugins
for Orthanc.
+
+
+Package: liborthancframework1
+Architecture: any
+Section: libs
+Depends: locales,
+ ${shlibs:Depends},
+ ${misc:Depends}
+Description: Orthanc Framework library
+ The Orthanc Framework is a shared library publishing C++ classes
+ from the Orthanc source code that are reused in most official
+ plugins for Orthanc.
+ .
+ This package contains the shared library of the Orthanc Framework.
+
+
+Package: liborthancframework-dev
+Architecture: any
+Section: libdevel
+Depends: liborthancframework1 (= ${binary:Version}),
+ libboost-all-dev,
+ libdcmtk-dev,
+ libjsoncpp-dev,
+ liblua5.3-dev,
+ libpugixml-dev,
+ libsqlite3-dev,
+ ${misc:Depends}
+Description: Orthanc Framework development files
+ The Orthanc Framework is a shared library publishing C++ classes
+ from the Orthanc source code that are reused in most official
+ plugins for Orthanc.
+ .
+ This package includes the header files of the Orthanc Framework.
=====================================
debian/liborthancframework-dev.dirs
=====================================
@@ -0,0 +1 @@
+usr/include/orthanc-framework
=====================================
debian/liborthancframework-dev.install
=====================================
@@ -0,0 +1,2 @@
+usr/include/orthanc-framework/*
+usr/lib/libOrthancFramework.so
=====================================
debian/liborthancframework1.install
=====================================
@@ -0,0 +1 @@
+usr/lib/libOrthancFramework.so.*
=====================================
debian/orthanc.dirs
=====================================
@@ -1,6 +1,7 @@
etc/init.d
etc/orthanc
usr/bin
+usr/lib/orthanc
usr/sbin
usr/share/doc/orthanc
usr/share/orthanc/plugins
=====================================
debian/orthanc.install
=====================================
@@ -1,8 +1,9 @@
debian/configuration/credentials.json etc/orthanc
debian/configuration/orthanc.json etc/orthanc
+debian/configuration/orthanc_upgrade usr/sbin
debian/configuration/serve-folders.json etc/orthanc
debian/configuration/worklists.json etc/orthanc
-debian/configuration/orthanc_upgrade usr/sbin
-Build/Orthanc usr/sbin
-Build/lib*.so.* usr/lib/orthanc
-Build/OrthancRecoverCompressedFile usr/bin
+usr/bin/OrthancRecoverCompressedFile
+usr/lib/orthanc/libModalityWorklists.so.*
+usr/lib/orthanc/libServeFolders.so.*
+usr/sbin/Orthanc
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+soversion
=====================================
debian/patches/soversion
=====================================
@@ -0,0 +1,17 @@
+Description: Adapt SOVERSION to match the name of the liborthancframework1 package
+Author: Sebastien Jodogne <s.jodogne at orthanc-labs.com>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: Orthanc-1.7.2/OrthancFramework/SharedLibrary/CMakeLists.txt
+===================================================================
+--- Orthanc-1.7.2.orig/OrthancFramework/SharedLibrary/CMakeLists.txt
++++ Orthanc-1.7.2/OrthancFramework/SharedLibrary/CMakeLists.txt
+@@ -271,7 +271,7 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emsc
+ set_target_properties(
+ OrthancFramework PROPERTIES
+ VERSION ${ORTHANC_VERSION}
+- SOVERSION ${ORTHANC_VERSION}
++ SOVERSION 1
+ )
+ endif()
+
=====================================
debian/rules
=====================================
@@ -4,11 +4,11 @@ include /usr/share/dpkg/pkg-info.mk # To access the "DEB_VERSION" variable
export DESTDIR := $(CURDIR)/debian/tmp
export DOC_DIR := $(DESTDIR)/usr/share/doc/orthanc
-export PLUGINS_DIR := $(DESTDIR)/usr/share/orthanc/plugins
+export FRAMEWORK_VERSION := 1
export UPSTREAM_VERSION := $(shell echo "$(DEB_VERSION)" | cut -d '+' -f 1)
-export BUILDARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+export BUILDARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Disable assert() checking from upstream project, for best performance
@@ -17,7 +17,7 @@ export DEB_CFLAGS_MAINT_APPEND=-DNDEBUG
export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG
%:
- dh $@ --builddirectory=Build
+ dh $@
CMAKE_EXTRA_FLAGS += \
-DCMAKE_SKIP_RPATH:BOOL=ON \
@@ -28,11 +28,18 @@ CMAKE_EXTRA_FLAGS += \
-DUSE_GOOGLE_TEST_DEBIAN_PACKAGE:BOOL=ON \
-DDCMTK_LIBRARIES:STRING=dcmjpls \
-DUNIT_TESTS_WITH_HTTP_CONNEXIONS:BOOL=OFF \
- -DBUILD_CONNECTIVITY_CHECKS:BOOL=OFF \
-DCMAKE_BUILD_TYPE=None # The build type must be set to None, see #711515
+CMAKE_EXTRA_FLAGS_SERVER += \
+ -DBUILD_CONNECTIVITY_CHECKS:BOOL=OFF
+
+CMAKE_EXTRA_FLAGS_FRAMEWORK += \
+ -DORTHANC_INSTALL_PREFIX:PATH=.
+
override_dh_auto_configure:
# Put 3rd party packages where the cmake build system expects them
+ mkdir -p OrthancFramework/SharedLibrary/ThirdPartyDownloads
+ ( cd OrthancFramework/SharedLibrary/ThirdPartyDownloads ; cp ../../../debian/ThirdPartyDownloads/* . )
mkdir -p OrthancServer/ThirdPartyDownloads
( cd OrthancServer/ThirdPartyDownloads ; cp ../../debian/ThirdPartyDownloads/* . )
@@ -51,16 +58,18 @@ override_dh_auto_configure:
> OrthancServer/OrthancExplorer/libs/date.js
cp debian/JS/jquery.mobile-1.1.0/images/* OrthancServer/OrthancExplorer/libs/images
- # Launch the original Orthanc CMake script
- dh_auto_configure --sourcedir=./OrthancServer/ -- $(CMAKE_EXTRA_FLAGS)
+ # Launch the original Orthanc CMake scripts
+ dh_auto_configure --sourcedir=./OrthancFramework/SharedLibrary/ --builddirectory=BuildFramework -- $(CMAKE_EXTRA_FLAGS) $(CMAKE_EXTRA_FLAGS_FRAMEWORK)
+ dh_auto_configure --sourcedir=./OrthancServer/ --builddirectory=BuildServer -- $(CMAKE_EXTRA_FLAGS) $(CMAKE_EXTRA_FLAGS_SERVER)
override_dh_auto_build:
- dh_auto_build
+ dh_auto_build --builddirectory=BuildFramework
+ dh_auto_build --builddirectory=BuildServer
# Fix the lintian warning: "orthanc-doc: embedded-javascript-library
# usr/share/doc/orthanc/OrthancPlugin/jquery.js please use libjs-jquery"
- rm Build/OrthancPluginDocumentation/doc/jquery.js
- ln -s /usr/share/javascript/jquery/jquery.min.js Build/OrthancPluginDocumentation/doc/jquery.js
+ rm BuildServer/OrthancPluginDocumentation/doc/jquery.js
+ ln -s /usr/share/javascript/jquery/jquery.min.js BuildServer/OrthancPluginDocumentation/doc/jquery.js
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@@ -71,14 +80,16 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
mkdir -p $(DESTDIR)/locale/
localedef -f UTF-8 -i en_US $(DESTDIR)/locale/en_US.UTF-8/
- ( cd Build; LOCPATH=$(DESTDIR)/locale/ ./UnitTests )
+ ( cd BuildFramework ; LOCPATH=$(DESTDIR)/locale/ LD_LIBRARY_PATH=. ./UnitTests-prefix/src/UnitTests-build/UnitTests )
+ ( cd BuildServer ; LOCPATH=$(DESTDIR)/locale/ ./UnitTests )
endif
override_dh_clean:
- rm -rf ThirdPartyDownloads
+ rm -rf OrthancFramework/SharedLibrary/ThirdPartyDownloads
+ rm -rf OrthancServer/ThirdPartyDownloads
dh_clean
-override_dh_auto_install-indep:
+override_dh_auto_install:
# Move the index of the "orthanc-doc" package from Debian
mkdir -p $(DOC_DIR)
cp debian/docs/index.html $(DOC_DIR)
@@ -87,9 +98,21 @@ override_dh_auto_install-indep:
cp -r OrthancServer/Resources/Samples $(DOC_DIR)/Samples
cp -r OrthancServer/Plugins/Samples $(DOC_DIR)/OrthancPluginSamples
- dh_auto_install -i
+ # Run the default installation steps
+ dh_auto_install --builddirectory=BuildFramework
+ dh_auto_install --builddirectory=BuildServer
+
+ # Move the plugins from "/usr/share/orthanc/plugins" to
+ # "/usr/lib/orthanc", to solve Lintian warning
+ # "link-to-shared-library-in-wrong-package"
+ mkdir -p $(DESTDIR)/usr/lib/orthanc
+ mv $(DESTDIR)/usr/share/orthanc/plugins/libServeFolders.so.$(UPSTREAM_VERSION) \
+ $(DESTDIR)/usr/lib/orthanc
+ mv $(DESTDIR)/usr/share/orthanc/plugins/libModalityWorklists.so.$(UPSTREAM_VERSION) \
+ $(DESTDIR)/usr/lib/orthanc
+
+override_dh_link:
-override_dh_link-arch:
# Create a link to the shared library of the plugins
dh_link usr/lib/orthanc/libServeFolders.so.$(UPSTREAM_VERSION) \
usr/share/orthanc/plugins/libServeFolders.so
View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/compare/6169a37a7896f026b8dfc64a4715a607a6b8656d...5e3cab1ad72854833ab30517b16ee56e1c228988
--
View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/compare/6169a37a7896f026b8dfc64a4715a607a6b8656d...5e3cab1ad72854833ab30517b16ee56e1c228988
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200722/b0392f1d/attachment-0001.html>
More information about the debian-med-commit
mailing list