File: rules

package info (click to toggle)
python-fudge 1.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 716 kB
  • sloc: javascript: 3,300; python: 2,537; makefile: 84; sh: 5
file content (28 lines) | stat: -rwxr-xr-x 761 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
#!/usr/bin/make -f

#DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=fudge
export PYBUILD_DISABLE_python3=test

LAST_CHANGE = "$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
SPHINXOPTS := -N -D html_last_updated_fmt="$(BUILD_DATE)"

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/docs/.build

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-fudge-doc/usr/share/doc/python-fudge-doc/html
	dh_sphinxdoc
endif

override_dh_compress:
	dh_compress -i -X.rst -X.js -X.html -X.txt