File: rules

package info (click to toggle)
corosync 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,796 kB
  • sloc: ansic: 41,702; sh: 11,456; makefile: 569
file content (74 lines) | stat: -rwxr-xr-x 1,887 bytes parent folder | download
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
68
69
70
71
72
73
74
#!/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
initscript-dir=usr/share/corosync
else
initscript-dir=etc/init.d
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 \
	    --enable-dbus \
	    $(enable-monitoring) \
	    $(enable-watchdog) \
	    --enable-augeas \
	    --enable-snmp \
	    --enable-xmlconf \
	    $(enable-systemd) \
	    --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

override_dh_missing:
	dh_missing --fail-missing

override_dh_gencontrol:
	debian/check_header_deps
	dh_gencontrol

# dwz fails with "Allocatable section in [...] after non-allocatable ones"
override_dh_dwz: