File: rules

package info (click to toggle)
pyepr 1.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,040 kB
  • sloc: python: 2,914; makefile: 234
file content (62 lines) | stat: -rwxr-xr-x 1,187 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
#!/usr/bin/make -f
# -*- makefile -*-

#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,numpy3,sphinxdoc --buildsystem=pybuild


override_dh_python3:
	dh_python3 -N python-epr-doc


override_dh_numpy3:
	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_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/_build/html/_downloads
else
	mkdir -p doc/_build/html
endif
	dh_installdocs