File: rules

package info (click to toggle)
gubbins 2.4.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,124 kB
  • sloc: ansic: 4,376; python: 1,599; sh: 185; makefile: 129; cpp: 27
file content (40 lines) | stat: -rwxr-xr-x 1,134 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/default.mk

# Fails to build with the following settings
# export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# export DEB_BUILD_MAINT_OPTIONS = hardening=+pie
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

%:
	dh $@ --with python3

override_dh_auto_install:
	dh_auto_install
	# pybuild --install --system=distutils
	cd python && \
	python3 setup.py install --root=../debian/gubbins --install-layout=deb --install-lib=/usr/share/gubbins --install-scripts=/usr/share/gubbins

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
	cd python && \
	PATH="$$PATH:../src" python3 setup.py test
endif

override_dh_install:
	dh_install
	find debian -name "*.la" -delete
	find debian -name "*.a" -delete
	mkdir -p debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)
	mv debian/$(DEB_SOURCE)/usr/bin/gubbins debian/$(DEB_SOURCE)/usr/lib/$(DEB_SOURCE)

override_dh_clean:
	dh_clean
	rm -rf python/*.egg-info python/build  python/Makefile
	find . -name "*.pyc" -delete
	rm -rf python/output_alignment python/tmp*