File: rules

package info (click to toggle)
pyepr 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,084 kB
  • sloc: python: 2,968; makefile: 128
file content (38 lines) | stat: -rwxr-xr-x 1,057 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
#!/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 $@ --buildsystem=pybuild

execute_after_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	env http_proxy='http://127.0.0.1:9/' https_proxy='https://127.0.0.1:9/' \
	sphinx-build -N -E -T $(SPHINXOPTS) -b html docs $(CURDIR)/.pybuild/docs/html
	$(RM) -r $(CURDIR)/.pybuild/docs/html/.doctrees
	$(RM) -r $(CURDIR)/.pybuild/docs/html/_downloads
else
	mkdir -p  $(CURDIR)/.pybuild/docs/html
endif

override_dh_python3:
	dh_python3 -N python-epr-doc

override_dh_installchangelogs:
	dh_installchangelogs -k docs/NEWS.rst

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