| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 4 |
include /usr/share/dpkg/buildflags.mk |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 7 |
|
| 8 |
export QT_SELECT := qt5 |
| 9 |
|
| 10 |
DCMMAJOR := $(shell readlink -f /usr/lib/libdcmimgle.so | cut -f3 -d.) |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ |
| 14 |
|
| 15 |
override_dh_auto_configure: |
| 16 |
dh_auto_configure -- \ |
| 17 |
--libdir="/usr/lib/$(DEB_HOST_MULTIARCH)/odin" \ |
| 18 |
--with-pic \ |
| 19 |
--enable-only-standalone-plugin \ |
| 20 |
--enable-static \ |
| 21 |
--enable-shared \ |
| 22 |
--enable-niftisupport \ |
| 23 |
--enable-vtksupport \ |
| 24 |
--enable-dcmtksupport \ |
| 25 |
--enable-pngsupport \ |
| 26 |
|
| 27 |
# do not install unittest suite |
| 28 |
override_dh_auto_install: |
| 29 |
dh_auto_install |
| 30 |
rm $(CURDIR)/debian/tmp/usr/bin/odintestsuite |
| 31 |
|
| 32 |
# there is also a 'test' target that doesn't do the right thing |
| 33 |
override_dh_auto_test: |
| 34 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 35 |
export DCMDICTPATH=`find /usr/share -name dicom.dic` ; \ |
| 36 |
if [ "$${DCMDICTPATH}" = "" ] ; then \ |
| 37 |
echo "No package contains dicom.dic ... test failed" ; \ |
| 38 |
exit 1 ; \ |
| 39 |
else \ |
| 40 |
$(MAKE) check ; \ |
| 41 |
fi |
| 42 |
endif |
| 43 |
|
| 44 |
# shared libs in odin package a only for private use |
| 45 |
override_dh_makeshlibs: |
| 46 |
dh_makeshlibs -n |
| 47 |
|
| 48 |
# let dh_shlibdeps find the other private libs |
| 49 |
# but it does not seem to work though... |
| 50 |
override_dh_shlibdeps: |
| 51 |
dh_shlibdeps -l $(CURDIR)/debian/mitools/usr/lib/$(DEB_HOST_MULTIARCH)/odin |
| 52 |
|
| 53 |
override_dh_clean: |
| 54 |
dh_clean |
| 55 |
find $(CURDIR) -name '*.loT' -delete |
| 56 |
|
| 57 |
override_dh_install: |
| 58 |
dh_install |
| 59 |
find debian/tmp \( -name "*.desktop" -o -name "*.la" \) -delete |
| 60 |
# Protect PACKAGE_NAME from multiple definitions in case the |
| 61 |
# macro collides with other projects declaring it the same way. |
| 62 |
# This works around #733598 without breaking upstream |
| 63 |
# expectation that this file is available to end users (as |
| 64 |
# pointed out in #1079274). |
| 65 |
sed -i 's/#define \(PACKAGE_NAME\) ".*"/#ifndef \1\n&\n#endif/' \ |
| 66 |
$(CURDIR)/debian/libodin-dev/usr/include/tjutils/config.h |