File: rules

package info (click to toggle)
python-afl 0.5.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 236 kB
  • ctags: 93
  • sloc: python: 560; sh: 85; makefile: 19
file content (28 lines) | stat: -rwxr-xr-x 1,223 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
#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export PYBUILD_NAME=afl
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

VERSION := $(shell dpkg-parsechangelog -Sversion | cut -d- -f1)
DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +"%F" -f -)

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

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -m nose -v" dh_auto_test

override_dh_auto_install:
	PYBUILD_SYSTEM=custom PYBUILD_INSTALL_ARGS="{interpreter} setup.py install --root={destdir} --install-scripts=/usr/share/{package}" dh_auto_install

override_dh_installdocs:
	rst2html -r 5 doc/README.rst .pybuild/README.html
	LANG=C.UTF-8 links -dump .pybuild/README.html > .pybuild/README
	dh_installdocs -A .pybuild/README doc/trophy-case.rst

override_dh_installman:
	txt2man -s 1 -v "python{,3}-afl" -t "py-afl-fuzz" -r "$(VERSION)" -d "$(DEBDATE)" debian/py-afl-fuzz.txt > .pybuild/py-afl-fuzz.py2.1
	dh_installman -ppython-afl .pybuild/py-afl-fuzz.py2.1
	txt2man -s 1 -v "python{,3}-afl" -t "py-afl-fuzz" -r "$(VERSION)" -d "$(DEBDATE)" debian/py-afl-fuzz.txt > .pybuild/py-afl-fuzz.py3.1
	dh_installman -ppython3-afl .pybuild/py-afl-fuzz.py3.1