File: rules

package info (click to toggle)
pyepr 0.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,080 kB
  • sloc: python: 2,927; makefile: 240; sh: 13
file content (75 lines) | stat: -rwxr-xr-x 1,436 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=epr
export PYBUILD_DISABLE=test
export DEB_BUILD_MAINT_OPTIONS=hardening=+all


include /usr/share/dpkg/pkg-info.mk
BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
SPHINXOPTS := -D today=\"$(BUILD_DATE)\"
SPHINXOPTS += -D html_last_updated_fmt=\"$(BUILD_DATE)\"


# Get the supported Python versions
#PY2VERS=$(shell pyversions -vr)
#PY3VERS=$(shell py3versions -vr)


ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
export CFLAGS ?= -O0
endif


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


override_dh_python2:
	dh_python2
	dh_numpy


override_dh_python3:
	dh_python3
	dh_numpy3


override_dh_auto_clean:
	dh_auto_clean
	$(RM) src/epr.c
	$(RM) -r doc/_build doc/html
	$(RM) -r build
	$(RM) -r *.egg-info


override_dh_strip:
	dh_strip -ppython-epr  --dbg-package=python-epr-dbg
	dh_strip -ppython3-epr --dbg-package=python3-epr-dbg


override_dh_installchangelogs:
	dh_installchangelogs -k doc/NEWS.rst


override_dh_compress:
	dh_compress -X.txt -X.rst -X.html -X.py


override_dh_sphinxdoc:
ifneq "$(shell dh_listpackages | grep -- -doc)" ""
	dh_sphinxdoc
endif


override_dh_installdocs:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) SPHINXOPTS="$(SPHINXOPTS)" doc
	$(RM) -r doc/html/_downloads
else
	mkdir -p doc/html
endif
	dh_installdocs