1313# Uncomment this to turn on verbose mode.
1414export 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,40 +33,39 @@ export TIME=$(shell LANG=C date --date='@$(TIMESTAMP)' '+%T')
3133kernel_version = @KERNEL_VERSION@
3234configure_realtime_arg = @CONFIGURE_REALTIME_ARG@
3335enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@
36+ SRCDIR = $(CURDIR ) /src
3437DESTDIR =$(CURDIR ) /debian/tmp
3538DEV_PACKAGE_NAME =@MAIN_PACKAGE_NAME@-dev
3639
40+ export PYTHON =/usr/bin/python3
41+
3742% :
38- dh $@
43+ dh $@ -D $( SRCDIR )
3944
4045override_dh_auto_configure :
4146 cd src && ./autogen.sh
42- cd src && PYTHON=/usr/bin/python3 ./configure \
47+ cd src && ./configure \
4348 --prefix=/usr --sysconfdir=/etc \
4449 --mandir=/usr/share/man \
4550 $(configure_realtime_arg ) \
4651 $(enable_build_documentation ) \
4752 --disable-check-runtime-deps
4853
4954override_dh_auto_build-arch :
50- $( MAKE ) PYTHON=/usr/bin/python3 -C src build-software
55+ dh_auto_build -- build-software
5156
5257override_dh_auto_build-indep :
5358ifneq "$(enable_build_documentation ) " ""
54- $(MAKE) PYTHON=/usr/bin/python3 -C src manpages
55- $(MAKE) PYTHON=/usr/bin/python3 -C src translateddocs
56- $(MAKE) PYTHON=/usr/bin/python3 -C src docs
59+ dh_auto_build -- manpages
60+ dh_auto_build -- translateddocs
61+ dh_auto_build -- docs
5762endif
5863
5964override_dh_auto_clean :
60- dh_auto_clean
61- py3clean .
62- if [ -r src/Makefile.inc -a -r src/config.status ]; then $( MAKE) -C src clean -s; fi
63- rm -f Makefile.inc
64- rm -f src/config.log src/config.status
65- rm -f $(for i in $(find . -name "*.in" ) ; do basename $i .in; done )
66- dh_clean
67-
65+ if [ -r src/Makefile.inc -a -r src/config.status ]; then \
66+ dh_auto_clean; \
67+ py3clean . ; \
68+ fi
6869
6970override_dh_auto_install-arch :
7071 # Install all architecture-dependent libraries and executables
0 commit comments