| 1 |
|
| 2 |
|
| 3 |
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) |
| 4 |
export DH_VERBOSE=1 |
| 5 |
endif |
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 7 |
|
| 8 |
include /usr/share/dpkg/architecture.mk |
| 9 |
include /usr/share/dpkg/pkg-info.mk |
| 10 |
|
| 11 |
export PYBUILD_NAME = $(DEB_SOURCE) |
| 12 |
|
| 13 |
configure_opts := --with-xtables \ |
| 14 |
--with-json \ |
| 15 |
--with-cli=editline |
| 16 |
pybuild_opts := --buildsystem=pybuild -- --dir $(CURDIR)/py |
| 17 |
pybuild_pkg := python3-$(PYBUILD_NAME) |
| 18 |
|
| 19 |
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) |
| 20 |
configure_opts += --disable-silent-rules |
| 21 |
pybuild_opts += --verbose |
| 22 |
else |
| 23 |
configure_opts += --enable-silent-rules |
| 24 |
pybuild_opts += --quiet |
| 25 |
endif |
| 26 |
|
| 27 |
%: |
| 28 |
dh $@ --with python3 |
| 29 |
|
| 30 |
override_dh_auto_clean: |
| 31 |
dh_auto_clean -N$(pybuild_pkg) |
| 32 |
dh_auto_clean -p$(pybuild_pkg) $(pybuild_opts) |
| 33 |
|
| 34 |
override_dh_auto_configure: |
| 35 |
dh_auto_configure -N$(pybuild_pkg) -- $(configure_opts) |
| 36 |
dh_auto_configure -p$(pybuild_pkg) $(pybuild_opts) |
| 37 |
|
| 38 |
override_dh_auto_build: |
| 39 |
dh_auto_build -N$(pybuild_pkg) -- MAKE_STAMP=$(SOURCE_DATE_EPOCH) |
| 40 |
dh_auto_build -p$(pybuild_pkg) $(pybuild_opts) |
| 41 |
|
| 42 |
override_dh_auto_test: |
| 43 |
|
| 44 |
override_dh_auto_install: |
| 45 |
dh_auto_install -N$(pybuild_pkg) |
| 46 |
dh_auto_install -p$(pybuild_pkg) $(pybuild_opts) |
| 47 |
|
| 48 |
execute_after_dh_fixperms: |
| 49 |
chmod a+x debian/nftables/etc/nftables.conf |
| 50 |
|
| 51 |
override_dh_installsystemd: |
| 52 |
dh_installsystemd --no-enable --no-start --restart-after-upgrade |
| 53 |
|
| 54 |
override_dh_installexamples: |
| 55 |
dh_installexamples -XMakefile |
| 56 |
|
| 57 |
ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 58 |
override_dh_link: |
| 59 |
endif |