3 # see FEATURE AREAS in dpkg-buildflags(1)
4 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
6 # Ensure that we link against all needed libraries (cf. Policy 10.2)
7 export DEB_LDFLAGS_MAINT_APPEND
=-Wl
,-z
,defs
9 ifneq ($(wildcard /usr
/include/statgrab.h
),)
10 enable-monitoring
=--enable-monitoring
13 ifneq ($(wildcard /usr
/include/linux
/watchdog.h
),)
14 enable-watchdog
=--enable-watchdog
17 ifneq ($(wildcard /usr
/include/systemd
/sd-daemon.h
),)
18 enable-systemd
=--enable-systemd
19 initscript-dir
=usr
/share
/corosync
21 initscript-dir
=etc
/init.d
27 # Avoid useless dependencies in the libraries
28 override_dh_autoreconf
:
29 dh_autoreconf
--as-needed
31 # Explicit BASHPATH fixes reproducible build on merged-usr vs non-merged:
32 override_dh_auto_configure
:
33 dh_auto_configure
-- \
35 --with-initconfigdir
=/etc
/default \
36 --with-logdir
=/var
/log
/corosync \
37 --with-systemddir
=/lib
/systemd
/system \
39 $(enable-monitoring
) \
47 override_dh_auto_build-indep
:
50 find doc
/api
/html
-name
"*.md5" -print -delete
52 # The check target would unnecessarily build the software
53 override_dh_auto_test-indep
:
55 override_dh_auto_install-indep
:
56 $(MAKE
) -C man DESTDIR
="$(CURDIR)/debian/tmp" install
58 override_dh_auto_install-arch
:
60 rm -v debian
/tmp
/usr
/lib
/*/lib
*.la
61 # we don't need the upstream license
62 rm debian
/tmp
/usr
/share
/doc
/corosync
/LICENSE
65 dh_missing
--fail-missing
67 override_dh_gencontrol
:
68 debian
/check_header_deps
71 # dwz fails with "Allocatable section in [...] after non-allocatable ones"