]>
Commit | Line | Data |
---|---|---|
8dcb3076 TL |
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 \ | |
64af7084 | 37 | --with-systemddir=/lib/systemd/system \ |
8dcb3076 TL |
38 | --enable-dbus \ |
39 | $(enable-monitoring) \ | |
40 | $(enable-watchdog) \ | |
41 | --disable-augeas \ | |
6d0495c4 | 42 | --enable-nozzle \ |
8dcb3076 TL |
43 | --enable-snmp \ |
44 | --enable-xmlconf \ | |
45 | $(enable-systemd) \ | |
90cd810c | 46 | --enable-vqsim \ |
8dcb3076 TL |
47 | --disable-static |
48 | ||
49 | override_dh_auto_build-indep: | |
50 | $(MAKE) -C man | |
51 | $(MAKE) doxygen | |
52 | find doc/api/html -name "*.md5" -print -delete | |
53 | ||
54 | # The check target would unnecessarily build the software | |
55 | override_dh_auto_test-indep: | |
56 | ||
57 | override_dh_auto_install-indep: | |
58 | $(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install | |
59 | ||
60 | override_dh_auto_install-arch: | |
61 | dh_auto_install | |
62 | rm -v debian/tmp/usr/lib/*/lib*.la | |
63 | # we don't need the upstream license | |
64 | rm debian/tmp/usr/share/doc/corosync/LICENSE | |
65 | ||
66 | override_dh_missing: | |
67 | dh_missing --fail-missing | |
68 | ||
69 | override_dh_gencontrol: | |
70 | debian/check_header_deps | |
71 | dh_gencontrol |