summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules57
1 files changed, 57 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..8151063
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,57 @@
+#!/usr/bin/make -f
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Link against all needed libraries (cf. Policy 10.2)
+export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
+
+export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
+
+# Ubuntu/i386 shrank into a compatibility layer not carrying the
+# dependencies of some of our binary packages (#948379):
+ifeq ($(shell dpkg-vendor --query vendor)/$(DEB_HOST_ARCH), Ubuntu/i386)
+ UBUNTU_EXCLUDES = \
+ -Npacemaker \
+ -Npacemaker-cli-utils \
+ -Npacemaker-remote \
+ -Npacemaker-resource-agents
+endif
+
+%:
+ dh $@ $(UBUNTU_EXCLUDES)
+
+override_dh_autoreconf:
+ dh_autoreconf ./autogen.sh
+
+# Explicit BASH_PATH makes build reproducible on merged-usr vs non-merged:
+override_dh_auto_configure:
+ dh_auto_configure -- --disable-static \
+ BASH_PATH=/bin/bash \
+ PYTHON=/usr/bin/python3 \
+ --with-cibsecrets \
+ --with-configdir=/etc/default \
+ --libexecdir=/usr/lib
+# because the daemon executables and Nagios plugins don't need multiarch paths
+
+override_dh_auto_build-indep:
+ dh_auto_build
+ $(MAKE) -C doc doxygen
+
+override_dh_installdocs:
+ dh_installdocs -A README.markdown
+
+# Move test package documentation to its canonical place:
+execute_after_dh_installdocs-indep:
+ mv --no-clobber \
+ debian/pacemaker-cts/usr/share/pacemaker/tests/README.md \
+ debian/pacemaker-cts/usr/share/doc/pacemaker-cts
+
+override_dh_installinit:
+# Upstream provides pacemaker and pacemaker-remote init files,
+# we dh_install them and force the maintainer script modifications here:
+ dh_installinit --onlyscripts --no-restart-after-upgrade -p pacemaker
+ dh_installinit --onlyscripts --no-restart-after-upgrade -p pacemaker-remote --name=pacemaker_remote
+
+override_dh_installsystemd:
+ dh_installsystemd --no-restart-after-upgrade