You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcpcfg/debian/rules

36 lines
1.0 KiB

#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1
SCRIPTS = \
$(CURDIR)/usr/sbin/ngcp-instances-validator \
$(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