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>
8 -Wno-missing-field-initializers \
10 -Wno-unused-parameter \
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
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
28 ifeq (,$(filter terse
,$(DEB_BUILD_OPTIONS
)))
29 TESTSUITEFLAGS
+= --verbose
32 # Enable parallel test suite
34 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
35 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
36 TESTSUITEFLAGS
+= -j
$(NUMJOBS
)
39 testflags
= TESTSUITEFLAGS
=$(TESTSUITEFLAGS
) TEST_PARALLEL
=$(NUMJOBS
)
42 $(CURDIR
)/build-aux
/run-script scripts
/dpkg-vendor.pl
44 DEB_VENDOR
= $(shell $(call dpkg_vendor
) --query Vendor
)
46 D
:= $(CURDIR
)/debian
/tmp
49 dh
$@
--builddirectory
=build-tree
51 override_dh_auto_configure
:
52 dh_auto_configure
-- \
54 $(shell $(dpkg_buildflags
) --export=configure
) \
55 --libexecdir
=\
$${exec_prefix}/lib \
56 --with-devlibdir
=\
$${prefix}/lib
/$(DEB_HOST_MULTIARCH
) \
63 execute_after_dh_auto_install
:
64 # Special-case the lintian profile, as dh cannot rename on install.
65 mkdir
-p
$(D
)/usr
/share
/lintian
/profiles
/dpkg
66 cp debian
/dpkg.lintian-profile \
67 $(D
)/usr
/share
/lintian
/profiles
/dpkg
/main.profile
69 override_dh_auto_test
:
70 dh_auto_test
-- $(testflags
)
72 override_dh_installsystemd
:
73 dh_installsystemd
-a
--name
=dpkg-db-backup \
74 --no-start
--no-stop-on-upgrade
76 execute_after_dh_installlogrotate
:
77 dh_installlogrotate
--name
=alternatives
79 override_dh_installdocs
:
80 dh_installdocs
-Ndpkg-dev
81 dh_installdocs
-pdpkg-dev
--doc-main-package
=dpkg
83 override_dh_installchangelogs
:
84 dh_installchangelogs
--no-trim
92 ifeq (,$(filter $(DEB_VENDOR
),Debian Ubuntu
))
93 execute_after_dh_install
:
94 dh_install
-pdpkg usr
/sbin
/dpkg-fsys-usrunmess
96 # XXX: We cannot use -X, see debhelper #756366.
97 execute_after_dh_installman
:
98 dh_installman
-pdpkg
$(wildcard \
99 $(D
)/usr
/share
/man
/*/dpkg-fsys-usrunmess
.8 \
100 $(D
)/usr
/share
/man
/*/*/dpkg-fsys-usrunmess
.8 \
103 # XXX: We cannot pass pathnames to dh_installman w/o $(D), and then dh_missing
104 # complains that the pathnames do not match, so ignore them.
106 dh_missing
-Xdpkg-fsys-usrunmess
.8
109 dh_missing
-Xdpkg-fsys-usrunmess