#!/usr/bin/make -f P3 = python3-dmidecode PYTHON3 = $(shell py3versions -s) # Not to get undefined symbol: dmixml_GetContent export CFLAGS=${CFLAGS-} -std=gnu89 %: dh $@ --with python3 override_dh_auto_clean: dh_auto_clean $(MAKE) clean override_dh_auto_build: set -e ;\ for python in $(PYTHON3); do \ $(MAKE) PY_BIN=$$python ; \ $(MAKE) PY_BIN=$$python-dbg ; \ done override_dh_auto_install: set -e ;\ for python in $(PYTHON3) ; do \ $$python src/setup.py install_lib --install-dir $(CURDIR)/debian/$(P3)/usr/lib/python3/dist-packages/ ; \ $$python-dbg src/setup-dbg.py install_lib --install-dir $(CURDIR)/debian/$(P3)-dbg/usr/lib/python3/dist-packages/ ; \ done override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) set -e ;\ for python in $(PYTHON3); do \ $(MAKE) PY_BIN=$$python -C unit-tests test; \ #$(MAKE) PY_BIN=$$python-dbg -C unit-tests test; \ done endif override_dh_installdocs: dh_installdocs -A README doc/AUTHORS doc/changelog doc/README.types doc/AUTHORS.upstream doc/README.upstream override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -p$(P3) --dbg-package=$(P3)-dbg endif