File: rules

package info (click to toggle)
pyepr 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,104 kB
  • sloc: python: 3,128; makefile: 256; sh: 13
file content (64 lines) | stat: -rwxr-xr-x 1,261 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
#!/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)\"


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


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


override_dh_python3:
	dh_python3 -N python-epr-doc
	dh_numpy3 -N python-epr-doc


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 -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