blob: 49b92980dd7e7be3477220a2127e6f4f736c406a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/usr/bin/make -f
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Ensure that we link against all needed libraries (cf. Policy 10.2)
export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
ifneq ($(wildcard /usr/include/statgrab.h),)
enable-monitoring=--enable-monitoring
endif
ifneq ($(wildcard /usr/include/linux/watchdog.h),)
enable-watchdog=--enable-watchdog
endif
ifneq ($(wildcard /usr/include/systemd/sd-daemon.h),)
enable-systemd=--enable-systemd
endif
%:
dh $@
# Avoid useless dependencies in the libraries
override_dh_autoreconf:
dh_autoreconf --as-needed
# Explicit BASHPATH fixes reproducible build on merged-usr vs non-merged:
override_dh_auto_configure:
dh_auto_configure -- \
BASHPATH=/bin/bash \
--with-initconfigdir=/etc/default \
--with-logdir=/var/log/corosync \
--with-systemddir=/lib/systemd/system \
--enable-dbus \
$(enable-monitoring) \
$(enable-watchdog) \
--enable-augeas \
--enable-nozzle \
--enable-snmp \
--enable-xmlconf \
$(enable-systemd) \
--enable-vqsim \
--disable-static
override_dh_auto_build-indep:
$(MAKE) -C man
$(MAKE) doxygen
find doc/api/html -name "*.md5" -print -delete
# The check target would unnecessarily build the software
override_dh_auto_test-indep:
override_dh_auto_install-indep:
$(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install
CONF=debian/tmp/etc/corosync/corosync.conf
override_dh_auto_install-arch:
dh_auto_install
# We patched the example into a working config file:
mv -v $(CONF).example $(CONF)
rm -v debian/tmp/usr/lib/*/lib*.la
# we don't need the upstream license
rm debian/tmp/usr/share/doc/corosync/LICENSE
execute_before_dh_gencontrol:
debian/check_header_deps
|