File: rules

package info (click to toggle)
elastix 4.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 55,608 kB
  • sloc: cpp: 58,067; lisp: 4,121; python: 777; sh: 227; xml: 182; makefile: 34
file content (49 lines) | stat: -rwxr-xr-x 1,814 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_CXXFLAGS_MAINT_APPEND  = -fvisibility=hidden

export DEB_LDFLAGS_MAINT_APPEND=-lniftiio

EPOCH_DATE:=$(shell TZ=UTC LC_ALL=C date --utc --date=@${SOURCE_DATE_EPOCH} +%d.%m.%Y)

%:
	dh $@

# Need -DUSE_KNNGraphAlphaMutualInformationMetric:BOOL=ON, otherwise
# KNN is not built, and link of elastix fails.
#
DEB_CMAKE_EXTRA_FLAGS += \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_BUILD_TYPE=RELEASE \
	-DCMAKE_SKIP_RPATH=ON \
	-DSOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH \
        -DBUILD_DOCUMENTATION=ON \
	-DELASTIX_USE_MEVISDICOMTIFF:BOOL=OFF \
	-DUSE_KNNGraphAlphaMutualInformationMetric:BOOL=ON

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CMAKE_EXTRA_FLAGS)

override_dh_installdocs-indep:
	# create help files using doxygen
	set -x ; \
	DOXDIR=`find . -name help -type d | sed 's?/help??'` ; \
	cd $${DOXDIR} ; \
	doxygen help/doxyfile.out ; \
	find help -name "*.md5" -delete
	sed -ie 's/^%\\date{/\\date{'"$(EPOCH_DATE)"'/' dox/manual/manual.tex 
	sed -ie 's/\\today/'"$(EPOCH_DATE)"'/' dox/manual/manual.tex 
	cd dox/manual && latex manual && bibtex manual && latex manual && latex manual && latex manual && dvipdf manual
	dh_installdocs -i
	# avoid privacy breach by using local logo
	sed -i 's#http://elastix.isi.uu.nl/images/##' debian/elastix-doc/usr/share/doc/elastix/help/html/*.html
	sed -i 's#http://elastix.isi.uu.nl/images/#html/#' debian/elastix-doc/usr/share/doc/elastix/help/*.html
	cp -a dox/art/elastix_logo_full.gif debian/elastix-doc/usr/share/doc/elastix/help/html/elastixLogo.gif

override_dh_auto_test:
        LD_LIBRARY_PATH=`pwd`/obj-*/bin dh_auto_test

override_dh_dwz:
	echo "Suppress dh_dwz due to: 'dwz: Too few files for multifile optimization'"