summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commite52abbeea0a0fd87f2df577263fdfcb89da6c1b0 (patch)
tree27a6f3ded04c521f55558166ee9322076339ca2b /debian/rules
parentAdding upstream version 1.21.22. (diff)
downloaddpkg-e52abbeea0a0fd87f2df577263fdfcb89da6c1b0.tar.xz
dpkg-e52abbeea0a0fd87f2df577263fdfcb89da6c1b0.zip
Adding debian version 1.21.22.debian/1.21.22debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules85
1 files changed, 85 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..eec7266
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,85 @@
+#!/usr/bin/make -f
+# debian/rules for the dpkg suite.
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
+# Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
+
+WFLAGS := \
+ -Wall -Wextra \
+ -Wno-missing-field-initializers \
+ -Wno-nonnull-compare \
+ -Wno-unused-parameter \
+ # EOL
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = $(WFLAGS)
+export DEB_CXXFLAGS_MAINT_APPEND = $(WFLAGS)
+
+# Use the in-tree dpkg-buildflags
+dpkg_buildflags = \
+ DEB_BUILD_MAINT_OPTIONS="$(DEB_BUILD_MAINT_OPTIONS)" \
+ DEB_CFLAGS_MAINT_APPEND="$(WFLAGS)" \
+ DEB_CXXFLAGS_MAINT_APPEND="$(WFLAGS)" \
+ $(CURDIR)/build-aux/run-script scripts/dpkg-buildflags.pl
+
+# Do not enable everything on all platforms.
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+ confflags += --with-libselinux
+endif
+ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
+ TESTSUITEFLAGS += --verbose
+endif
+
+# Enable parallel test suite
+NUMJOBS = 1
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ TESTSUITEFLAGS += -j$(NUMJOBS)
+endif
+
+testflags = TESTSUITEFLAGS=$(TESTSUITEFLAGS) TEST_PARALLEL=$(NUMJOBS)
+
+D := $(CURDIR)/debian/tmp
+
+%:
+ dh $@ --builddirectory=build-tree
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ $(confflags) \
+ $(shell $(dpkg_buildflags) --export=configure) \
+ --sbindir=/sbin \
+ --libexecdir=\$${exec_prefix}/lib \
+ --with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+ --with-libz \
+ --with-liblzma \
+ --with-libzstd \
+ --with-libbz2 \
+ # EOL
+
+execute_after_dh_auto_install:
+ # Special-case the lintian profile, as dh cannot rename on install.
+ mkdir -p $(D)/usr/share/lintian/profiles/dpkg
+ cp debian/dpkg.lintian-profile \
+ $(D)/usr/share/lintian/profiles/dpkg/main.profile
+
+override_dh_auto_test:
+ dh_auto_test -- $(testflags)
+
+override_dh_installsystemd:
+ dh_installsystemd -a --name=dpkg-db-backup
+
+execute_after_dh_installlogrotate:
+ dh_installlogrotate --name=alternatives
+
+override_dh_installdocs:
+ dh_installdocs -Ndpkg-dev
+ dh_installdocs -pdpkg-dev --doc-main-package=dpkg
+
+override_dh_installchangelogs:
+ dh_installchangelogs --no-trim
+
+override_dh_bugfiles:
+ dh_bugfiles -A
+
+override_dh_compress:
+ dh_compress -Xspec/