]> git.proxmox.com Git - corosync-pve.git/blob - debian/rules
2b463867e7621db7804b90e2470b6f05a39dd356
[corosync-pve.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # see FEATURE AREAS in dpkg-buildflags(1)
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
6 # Ensure that we link against all needed libraries (cf. Policy 10.2)
7 export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
8
9 ifneq ($(wildcard /usr/include/statgrab.h),)
10 enable-monitoring=--enable-monitoring
11 endif
12
13 ifneq ($(wildcard /usr/include/linux/watchdog.h),)
14 enable-watchdog=--enable-watchdog
15 endif
16
17 ifneq ($(wildcard /usr/include/systemd/sd-daemon.h),)
18 enable-systemd=--enable-systemd
19 initscript-dir=usr/share/corosync
20 else
21 initscript-dir=etc/init.d
22 endif
23
24 %:
25 dh $@
26
27 # Avoid useless dependencies in the libraries
28 override_dh_autoreconf:
29 dh_autoreconf --as-needed
30
31 # Explicit BASHPATH fixes reproducible build on merged-usr vs non-merged:
32 override_dh_auto_configure:
33 dh_auto_configure -- \
34 BASHPATH=/bin/bash \
35 --with-initconfigdir=/etc/default \
36 --with-logdir=/var/log/corosync \
37 --with-systemddir=/lib/systemd/system \
38 --enable-dbus \
39 $(enable-monitoring) \
40 $(enable-watchdog) \
41 --disable-augeas \
42 --enable-snmp \
43 --enable-xmlconf \
44 $(enable-systemd) \
45 --disable-static
46
47 override_dh_auto_build-indep:
48 $(MAKE) -C man
49 $(MAKE) doxygen
50 find doc/api/html -name "*.md5" -print -delete
51
52 # The check target would unnecessarily build the software
53 override_dh_auto_test-indep:
54
55 override_dh_auto_install-indep:
56 $(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install
57
58 override_dh_auto_install-arch:
59 dh_auto_install
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
63
64 override_dh_missing:
65 dh_missing --fail-missing
66
67 override_dh_gencontrol:
68 debian/check_header_deps
69 dh_gencontrol
70
71 # dwz fails with "Allocatable section in [...] after non-allocatable ones"
72 override_dh_dwz: