#!/usr/bin/make -f # pybuild matches the python3-pkgos binary package against this name. export PYBUILD_NAME = pkgos # PBR reads its version from the git tags, which are absent from the # source used by sbuild: export the version from debian/changelog, the # same way pkgos.make does for the packages built with it. export PBR_VERSION?=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~bpo.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' -e 's/~/.0/' | head -n 1) %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) stestr run endif override_dh_install: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) # The test suite must never open a reportbug window (there is no # test for the window itself, which would require a display), so # remove any display from the environment and force the # pkgos-reportbug fallback. The runner is used from the source # tree, as this package cannot build-depend on itself. env -u DISPLAY -u WAYLAND_DISPLAY PKGOS_DEBPIPY_NO_REPORTBUG=1 \ ./build-tools/pkgos-run-tests tests echo "===> Checking scripts" set -e ; for i in `ls $(CURDIR)/salsa-scripts/pkgos-salsa-* $(CURDIR)/build-tools/pkgos-* $(CURDIR)/misc/pkgos-* | grep -v misc/pkgos-check-changelog` ; do \ echo "-> Checking $$i" ; \ sh -n $$i ; \ done endif dh_install