File: rules

package info (click to toggle)
exabgp 4.2.21-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,808 kB
  • sloc: python: 41,725; sh: 581; perl: 31; makefile: 22
file content (29 lines) | stat: -rwxr-xr-x 1,097 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export PYBUILD_NAME=exabgp

PYTHON3S:=$(shell py3versions -vr)

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

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild
	rm -rf $(CURDIR)/debian/python*-exabgp/usr/etc $(CURDIR)/debian/python*-exabgp/usr/share/exabgp
	mkdir -p $(CURDIR)/debian/python3-exabgp/usr/sbin
	mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp
	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 $(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