File: rules

package info (click to toggle)
exabgp 4.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,468 kB
  • sloc: python: 39,616; sh: 624; perl: 31; makefile: 25
file content (32 lines) | stat: -rwxr-xr-x 1,397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/make -f

export PYBUILD_NAME=exabgp

PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)

%:
	dh $@ --with python2,python3 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild
	rm -rf $(CURDIR)/debian/exabgp/usr/etc $(CURDIR)/debian/python*-exabgp/usr/share/exabgp
	mkdir -p $(CURDIR)/debian/python-exabgp/usr/sbin $(CURDIR)/debian/python3-exabgp/usr/sbin
	mv $(CURDIR)/debian/python-exabgp/usr/bin/exabgp $(CURDIR)/debian/python-exabgp/usr/sbin/python2-exabgp
	mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp
	mv $(CURDIR)/debian/python-exabgp/usr/bin/exabgpcli $(CURDIR)/debian/python-exabgp/usr/sbin/python2-exabgpcli
	mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgpcli $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgpcli

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e; set -x; for pyvers in $(PYTHONS) $(PYTHON3S); do \
		PYMAJOR=`echo $$pyvers | cut -d '.' -f 1`; \
		env INTERPRETER=python$$pyvers sbin/exabgp --fi > etc/exabgp/exabgp.env ; \
		env INTERPRETER=python$$pyvers ./qa/bin/parsing ; \
		env INTERPRETER=python$$pyvers ETC=$(CURDIR)/etc/exabgp exabgp_log_enable=false python$$pyvers -m nose ./qa/tests/*_test.py ; \
	done
endif

override_dh_auto_clean:
	dh_auto_clean --buildsystem=pybuild
	rm -f etc/exabgp/exabgp.env