Skip to content

Commit 886d8b1

Browse files
committed
debian: rules.in: export all necessary variables and pass path to src dir
After these changes, the dh_auto_XX commands will receive all the necessary variables and parameters and pass the applicable variables\parameters to the dh_XX commands. All dh commands will be run in the src directory if they are not overridden. That is, we need to write the override like this: override_dh_auto_build-arch: dh_auto_build -- build-software NOT so: override_dh_auto_build-arch: dh_build -- build-software
1 parent f6a6942 commit 886d8b1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

debian/rules.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
# Uncomment this to turn on verbose mode.
1414
export DH_VERBOSE=1
1515

16-
include /usr/share/dpkg/pkg-info.mk
16+
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
17+
DPKG_EXPORT_BUILDFLAGS = 1
18+
include /usr/share/dpkg/default.mk
1719

1820
# Support more robust code and makes code modifications more difficult
1921
# Compare https://wiki.debian.org/Hardening
@@ -31,11 +33,12 @@ export TIME=$(shell LANG=C date --date='@$(TIMESTAMP)' '+%T')
3133
kernel_version = @KERNEL_VERSION@
3234
configure_realtime_arg = @CONFIGURE_REALTIME_ARG@
3335
enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@
36+
SRCDIR = $(CURDIR)/src
3437
DESTDIR=$(CURDIR)/debian/tmp
3538
DEV_PACKAGE_NAME=@MAIN_PACKAGE_NAME@-dev
3639

3740
%:
38-
dh $@
41+
dh $@ -D$(SRCDIR)
3942

4043
override_dh_auto_configure:
4144
cd src && ./autogen.sh

0 commit comments

Comments
 (0)