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 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
WFLAGS := \
-Wall -Wextra \
-Wno-missing-field-initializers \
-Wno-nonnull-compare \
-Wno-unused-parameter \
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = $(WFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND = $(WFLAGS)
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
ifeq ($(DEB_HOST_ARCH_OS),linux)
confflags += --with-libselinux
endif
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
testflags += TEST_VERBOSE=1
endif
NUMJOBS = 1
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
testflags += TEST_PARALLEL=$(NUMJOBS)
endif
dpkg_vendor = \
$(CURDIR)/build-aux/run-script scripts/dpkg-vendor.pl
DEB_VENDOR = $(shell $(call dpkg_vendor) --query Vendor)
D := $(CURDIR)/debian/tmp
%:
dh $@ --builddirectory=build-tree
override_dh_auto_configure:
dh_auto_configure -- \
$(confflags) \
$(shell $(dpkg_buildflags) --export=configure) \
--libexecdir=\$${exec_prefix}/lib \
--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
--with-libz \
--with-liblzma \
--with-libzstd \
--with-libbz2 \
execute_after_dh_auto_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 \
--no-start --no-stop-on-upgrade
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/
|