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
|
#!/usr/bin/make -f
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
PACKAGE = $(shell dh_listpackages)
TMP = $(CURDIR)/debian/$(PACKAGE)
BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(CURDIR)/$(BUILD_DIR):$(TMP)/usr/lib
export LD_LIBRARY_PATH
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
# CMAKE_PREFIX_PATH is used when building against ITK 3.20
DEB_CMAKE_EXTRA_FLAGS += \
-DCMAKE_PREFIX_PATH=/usr/lib/InsightToolkit \
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DPLM_CONFIG_DEBIAN_BUILD:BOOL=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING:BOOL=ON
override_dh_auto_configure:
dh_auto_configure -- $(DEB_CMAKE_EXTRA_FLAGS)
override_dh_auto_test:
#Make the test suit fatal on supported arches
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-amd64))
dh_auto_test
else
dh_auto_test || true
endif
override_dh_auto_install:
dh_auto_install
rm -rfv $(TMP)/usr/lib/*.a
rm -rfv $(TMP)/usr/lib/cmake
rm -rfv $(TMP)/usr/include
get-orig-source:
mkdir -p ../tarballs
uscan --verbose --force-download --repack --compression xz --destdir=../tarballs
|