Dpkg::OpenPGP::Backend::GnuPG: Accept keybox format keyrings as-is
[dpkg.git] / debian / rules
blob2a85fd1c3bb923062eca63521882aef13b8b93de
1 #!/usr/bin/make -f
2 # debian/rules for the dpkg suite.
3 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>
4 # Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
6 WFLAGS := \
7 -Wall -Wextra \
8 -Wno-missing-field-initializers \
9 -Wno-nonnull-compare \
10 -Wno-unused-parameter \
11 # EOL
13 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
14 export DEB_CFLAGS_MAINT_APPEND = $(WFLAGS)
15 export DEB_CXXFLAGS_MAINT_APPEND = $(WFLAGS)
17 # Use the in-tree dpkg-buildflags
18 dpkg_buildflags = \
19 DEB_BUILD_MAINT_OPTIONS="$(DEB_BUILD_MAINT_OPTIONS)" \
20 DEB_CFLAGS_MAINT_APPEND="$(WFLAGS)" \
21 DEB_CXXFLAGS_MAINT_APPEND="$(WFLAGS)" \
22 $(CURDIR)/build-aux/run-script scripts/dpkg-buildflags.pl
24 # Do not enable everything on all platforms.
25 ifeq ($(DEB_HOST_ARCH_OS),linux)
26 confflags += --with-libselinux
27 endif
28 ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
29 TESTSUITEFLAGS += --verbose
30 endif
32 # Enable parallel test suite
33 NUMJOBS = 1
34 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
35 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
36 TESTSUITEFLAGS += -j$(NUMJOBS)
37 endif
39 testflags = TESTSUITEFLAGS=$(TESTSUITEFLAGS) TEST_PARALLEL=$(NUMJOBS)
41 D := $(CURDIR)/debian/tmp
44 dh $@ --builddirectory=build-tree
46 override_dh_auto_configure:
47 dh_auto_configure -- \
48 $(confflags) \
49 $(shell $(dpkg_buildflags) --export=configure) \
50 --sbindir=/sbin \
51 --libexecdir=\$${exec_prefix}/lib \
52 --with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
53 --with-libz \
54 --with-liblzma \
55 --with-libzstd \
56 --with-libbz2 \
57 # EOL
59 execute_after_dh_auto_install:
60 # Special-case the lintian profile, as dh cannot rename on install.
61 mkdir -p $(D)/usr/share/lintian/profiles/dpkg
62 cp debian/dpkg.lintian-profile \
63 $(D)/usr/share/lintian/profiles/dpkg/main.profile
65 override_dh_auto_test:
66 dh_auto_test -- $(testflags)
68 override_dh_installsystemd:
69 dh_installsystemd -a --name=dpkg-db-backup \
70 --no-start --no-stop-on-upgrade
72 execute_after_dh_installlogrotate:
73 dh_installlogrotate --name=alternatives
75 override_dh_installdocs:
76 dh_installdocs -Ndpkg-dev
77 dh_installdocs -pdpkg-dev --doc-main-package=dpkg
79 override_dh_installchangelogs:
80 dh_installchangelogs --no-trim
82 override_dh_bugfiles:
83 dh_bugfiles -A
85 override_dh_compress:
86 dh_compress -Xspec/