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
|
#!/usr/bin/make -f
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
export DH_VERBOSE=1
endif
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
export PYBUILD_NAME = $(DEB_SOURCE)
configure_opts := --with-xtables \
--with-json \
--with-cli=editline
pybuild_opts := --buildsystem=pybuild -- --dir $(CURDIR)/py
pybuild_pkg := python3-$(PYBUILD_NAME)
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
configure_opts += --disable-silent-rules
pybuild_opts += --verbose
else
configure_opts += --enable-silent-rules
pybuild_opts += --quiet
endif
%:
dh $@ --with python3
override_dh_auto_clean:
dh_auto_clean -N$(pybuild_pkg)
dh_auto_clean -p$(pybuild_pkg) $(pybuild_opts)
override_dh_auto_configure:
dh_auto_configure -N$(pybuild_pkg) -- $(configure_opts)
dh_auto_configure -p$(pybuild_pkg) $(pybuild_opts)
override_dh_auto_build:
dh_auto_build -N$(pybuild_pkg) -- MAKE_STAMP=$(SOURCE_DATE_EPOCH)
dh_auto_build -p$(pybuild_pkg) $(pybuild_opts)
override_dh_auto_test:
override_dh_auto_install:
dh_auto_install -N$(pybuild_pkg)
dh_auto_install -p$(pybuild_pkg) $(pybuild_opts)
execute_after_dh_fixperms:
chmod a+x debian/nftables/etc/nftables.conf
override_dh_installsystemd:
dh_installsystemd --no-enable --no-start --restart-after-upgrade
override_dh_installexamples:
dh_installexamples -XMakefile
ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
override_dh_link:
endif
|