File: rules

package info (click to toggle)
kineticstools 0.6.1%2Bgit20220223.1326a4d%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,140 kB
  • sloc: python: 3,503; makefile: 202; ansic: 104; sh: 55; xml: 19
file content (45 lines) | stat: -rwxr-xr-x 1,452 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/make -f

DH_VERBOSE = 1
include /usr/share/dpkg/default.mk

export LC_ALL=C.UTF-8
export PYBUILD_NAME=kineticstools
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

INSTDIR = $(CURDIR)/debian/$(DEB_SOURCE)
BINDIR = $(INSTDIR)/usr/bin
MANDIR = $(INSTDIR)/usr/share/man/
DATADIR = $(CURDIR)/debian/kineticstools-data/usr/share/kineticstools/resources

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

override_dh_auto_install:
	dh_auto_install
	mkdir -p $(BINDIR)
	mv debian/python3-kineticstools/usr/bin/* $(BINDIR)
	mkdir -p $(MANDIR)/man1
	rst2man doc/manual.rst > $(MANDIR)/man1/ipdSummary.1
	mkdir -p debian/kineticstools-data/usr/share/kineticstools
	# There is probably a simpler way, but that should do for the moment.
	set -e                                                              \
	; for libdir in debian/python3-kineticstools/usr/lib/python3.*      \
	; do rm -rf $(DATADIR)                                              \
	;    mv $${libdir}/dist-packages/kineticsTools/resources $(DATADIR) \
	; done
	rm debian/python3-kineticstools/usr/lib/python3.*/dist-packages/nosetests.xml

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pytest_cache
	rm -rf kineticsTools.egg-info
	rm -f nosetests.xml
	rm -f bin/ipdSummary

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cp kineticsTools/ipdSummary.py bin/ipdSummary
	chmod +x bin/ipdSummary
	PYTHONPATH=$(CURDIR) PATH=$$PATH:$(CURDIR)/bin dh_auto_test
endif