File: rules

package info (click to toggle)
binwalk 2.3.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,040 kB
  • sloc: python: 5,636; sh: 239; makefile: 17
file content (28 lines) | stat: -rwxr-xr-x 755 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
#!/usr/bin/make -f

# export DH_VERBOSE=1
export PYBUILD_NAME=binwalk

PYVER := $(shell py3versions -d)

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

override_dh_auto_clean:
	# Upstream setup.py clean does not accept options passed by
	# pybuild
	python3 setup.py clean

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	HOME= PYTHONPATH=src python3 setup.py test || true
endif

override_dh_install:
	dh_install
	mkdir -p debian/binwalk/usr/bin
	mv debian/python3-binwalk/usr/bin debian/binwalk/usr
	# run tests again, here we have a properly installed binwalk into debian directory
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	HOME= PYTHONPATH=debian/python3-binwalk/usr/lib/$(PYVER)/dist-packages/ python3 setup.py test
endif