File: rules

package info (click to toggle)
ryu 4.30+ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 24,204 kB
  • sloc: python: 111,247; erlang: 14,517; ansic: 594; sh: 516; makefile: 150
file content (54 lines) | stat: -rwxr-xr-x 1,606 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/osrg/ryu.git
include /usr/share/openstack-pkg-tools/pkgos.make

LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")

%:
	dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd

override_dh_auto_build:
	/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func ryu-bin.postinst

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	for i in $(PYTHON3S) ; do \
		http_proxy=127.0.0.1:9 https_proxy=127.0.0.1:9 PYTHONPATH=. python$$i ryu/tests/run_tests.py ; \
	done
endif

override_dh_installman:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	cd doc; \
	make man SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" ;\
	cp build/man/* ../debian/
	dh_installman
endif

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source debian/python-ryu-doc/usr/share/doc/python-ryu-doc/html
	dh_sphinxdoc
endif

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2
	rm -rf $(CURDIR)/debian/python3-ryu/usr/etc $(CURDIR)/debian/python-ryu/usr/etc

override_dh_installinit:
	dh_installinit --no-start --name=ryu

override_dh_installlogrotate:
	dh_installlogrotate --name=ryu

override_dh_clean:
	http_proxy=127.0.0.1:9 https_proxy=127.0.0.1:9 dh_clean
	rm -rf debian/*.init debian/*.upstart debian/*.service build doc/build

override_dh_auto_clean:
	rm -rf debian/ryu-manager.8 debian/ryu.8 debian/ryu-bin.postinst

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3