1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
#!/usr/bin/make -f
export DESTDIR := $(CURDIR)/debian/tmp
export DOC_DIR := $(DESTDIR)/usr/share/doc/orthanc
export PLUGINS_DIR := $(DESTDIR)/usr/share/orthanc/plugins
export DEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
export UPSTREAM_VERSION := $(shell echo "$(DEBIAN_VERSION)" | cut -d '+' -f 1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --builddirectory=Build
# Remarks about the flags to CMake below:
# -DCMAKE_BUILD_TYPE="" => The build type must be left empty, see #711515
CMAKE_EXTRA_FLAGS += \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DSTATIC_BUILD:BOOL=OFF \
-DSTANDALONE_BUILD:BOOL=ON \
-DUSE_SYSTEM_MONGOOSE:BOOL=OFF \
-DUSE_GTEST_DEBIAN_SOURCE_PACKAGE:BOOL=ON \
-DDCMTK_LIBRARIES:STRING=dcmjpls \
-DUNIT_TESTS_WITH_HTTP_CONNEXIONS:BOOL=OFF \
-DCMAKE_BUILD_TYPE=""
override_dh_auto_configure:
# Put 3rd party packages where the cmake build system expects them
mkdir -p ThirdPartyDownloads
( cd ThirdPartyDownloads; cp ../debian/ThirdPartyDownloads/* . )
# Place back minified JavaScript libraries that were stripped from upstream
yui-compressor debian/JS/jquery-1.7.2.js \
> OrthancExplorer/libs/jquery.min.js
yui-compressor debian/JS/jquery.mobile-1.1.0/jquery.mobile-1.1.0.js \
> OrthancExplorer/libs/jquery.mobile.min.js
yui-compressor debian/JS/jquery.mobile-1.1.0/jquery.mobile-1.1.0.css \
> OrthancExplorer/libs/jquery.mobile.min.css
cat debian/JS/DateJs/src/globalization/en-US.js \
debian/JS/DateJs/src/core-debug.js \
debian/JS/DateJs/src/sugarpak-debug.js \
debian/JS/DateJs/src/parser-debug.js \
| yui-compressor --type js \
> OrthancExplorer/libs/date.js
cp debian/JS/jquery.mobile-1.1.0/images/* OrthancExplorer/libs/images
# Launch the original Orthanc CMake script
dh_auto_configure -- $(CMAKE_EXTRA_FLAGS)
override_dh_auto_build:
dh_auto_build
# 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
override_dh_auto_test:
( cd Build; ./UnitTests )
override_dh_clean:
rm -rf ThirdPartyDownloads
dh_clean
override_dh_auto_install-indep:
# Move the index of the "orthanc-doc" package from Debian
mkdir -p $(DOC_DIR)
cp debian/docs/index.html $(DOC_DIR)
# Populate the content of the "orthanc-doc" package
cp -r Resources/Samples $(DOC_DIR)/Samples
cp -r Plugins/Samples $(DOC_DIR)/OrthancPluginSamples
dh_auto_install -i
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
dh_link usr/lib/orthanc/libModalityWorklists.so.$(UPSTREAM_VERSION) \
usr/share/orthanc/plugins/libModalityWorklists.so
override_dh_installchangelogs:
dh_installchangelogs -k NEWS
override_dh_compress:
# Do not compress the samples
dh_compress -XOrthancPluginSamples -XSamples
get-orig-source:
uscan --verbose --force-download --repack --compression xz
|