#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE = 1 SCRIPTS = \ $(CURDIR)/usr/sbin/ngcp-network \ $(CURDIR)/usr/sbin/ngcp-network-validator \ # EOL %: dh $@ override_dh_auto_build: dh_testdir $(MAKE) man # Catch any syntax errors *before* building the ".deb". $(MAKE) syntaxcheck execute_after_dh_install: for s in $(SCRIPTS); do \ test -r "$$s" \ && sed -i -e "s/VERSION = 'UNRELEASED'/VERSION = '$(VERSION)'/" "$$s" \ || true; \ done execute_after_dh_auto_test: ## This is a hack to automatically copy the pytest result via pbuilder to ## the workspace so we can automatically use it as Jenkins test result. # Starting with pbuilder v0.216 it defaults to "/build". if [ -d /build/ ] ; then find $(CURDIR)/results/ -name pytest.xml -exec cp {} /build/ \; || true ; fi # Previous pbuilder versions default to "/tmp/buildd". if [ -d /tmp/buildd/ ] ; then find $(CURDIR)/results/ -name pytest.xml -exec cp {} /tmp/buildd/ \; || true ; fi