]> git.proxmox.com Git - corosync-pve.git/blame - debian/rules
buildsys: fix source tarball generation directory level one-off
[corosync-pve.git] / debian / rules
CommitLineData
8dcb3076
TL
1#!/usr/bin/make -f
2
3# see FEATURE AREAS in dpkg-buildflags(1)
4export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
6# Ensure that we link against all needed libraries (cf. Policy 10.2)
7export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
8
9ifneq ($(wildcard /usr/include/statgrab.h),)
10enable-monitoring=--enable-monitoring
11endif
12
13ifneq ($(wildcard /usr/include/linux/watchdog.h),)
14enable-watchdog=--enable-watchdog
15endif
16
17ifneq ($(wildcard /usr/include/systemd/sd-daemon.h),)
18enable-systemd=--enable-systemd
19initscript-dir=usr/share/corosync
20else
21initscript-dir=etc/init.d
22endif
23
24%:
25 dh $@
26
27# Avoid useless dependencies in the libraries
28override_dh_autoreconf:
29 dh_autoreconf --as-needed
30
31# Explicit BASHPATH fixes reproducible build on merged-usr vs non-merged:
32override_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
49override_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
55override_dh_auto_test-indep:
56
57override_dh_auto_install-indep:
58 $(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install
59
60override_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
66override_dh_missing:
67 dh_missing --fail-missing
68
69override_dh_gencontrol:
70 debian/check_header_deps
71 dh_gencontrol