Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile-gmake -*-
3
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
6 export DEB_LDFLAGS_MAINT_APPEND = -fvisibility=hidden
7 export DEB_CPPFLAGS_MAINT_APPEND = -DH5Oget_info_by_name_vers=1 -DH5O_info_t_vers=1
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13 # deduce documentation option (build-indep target)
14 ifeq "" "$(filter %-doc,$(shell dh_listpackages))"
15 BUILDDOC = OFF
16 else
17 BUILDDOC = ON
18 endif
19
20
21 .PHONY: override_dh_strip override_dh_shlibdeps
22
23 %:
24 dh $@
25
26 # TODO: Remove -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON when switching to
27 # debhelper compat level 14; it's added automatically by debhelper's
28 # cmake build system.
29 override_dh_auto_configure:
30 dh_auto_configure -- \
31 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
32 -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \
33 -DALWAYS_CREATE_DOC=$(BUILDDOC) \
34 -DSTRICT_DEPENDECIES=ON \
35 -DMIA_CREATE_MANPAGES=ON \
36 -DMIA_CREATE_USERDOC=$(BUILDDOC) \
37 -DMIA_CREATE_NIPYPE_INTERFACES=OFF \
38 -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=OFF
39
40 override_dh_auto_test-indep: ;
41
42 # Skip some failing tests; variable definitions should be kept in sync
43 # with those at debian/tests/testsuite.
44 SKIP := 2d-imageio|2dmyocardsegset-io-xml|3d-vectorfield|3d-rigidregister|cmdlineparseroutput|cmdxmlhelp|fastica-implementation-fastica
45 ifeq ($(DEB_HOST_ARCH_BITS),32)
46 SKIP_32 := |2dimage-cost-lsd
47 endif
48 override_dh_auto_test-arch:
49 dh_auto_test -- ARGS\+="--exclude-regex \"$(SKIP)$(SKIP_32)\""
50
51 # dh_strip detects executable files, so make *.mia files executable then strip then
52 # remove the executable flag
53 override_dh_strip:
54 `pwd`/debian/run_strip
55
56 override_dh_auto_build-indep:
57 dh_auto_build -- doc
58
59 override_dh_auto_build-arch:
60 dh_auto_build
61
62 override_dh_auto_install-indep:
63 # Install process expects some files that are not built in arch all builds
64 dh_auto_install -i || true
65 find debian/*/usr/share/doc -name CMakeLists.txt -delete
66
67 override_dh_shlibdeps:
68 dh_shlibdeps -- $(shell find debian/libmia-2.4-4/ -name "*.mia")
69
70 override_dh_missing:
71 find debian/tmp \( -name "*-doc.desktop" -o -name COPYING \) -delete
72 dh_missing