File: rules

package info (click to toggle)
quart 0.11.3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,448 kB
  • sloc: python: 8,071; makefile: 43; sql: 6
file content (45 lines) | stat: -rwxr-xr-x 1,434 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
#!/usr/bin/make -f

export PYBUILD_NAME=quart

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

BUILD_DATE  = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -N -D html_last_updated_fmt=\"$(BUILD_DATE)\"

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

override_dh_auto_clean:
	dh_auto_clean
	sed -i \
		-e 's,sphinx_rtd_theme,solar_theme,g' \
		-e 's,theme.get_html_theme_path(),theme.theme_path,g' \
		-e 's,version = ".*",version = meta_version("quart"),g' \
		docs/conf.py
	rm -rf docs/_build

override_dh_installdocs:
	dh_installdocs -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
	dh_installdocs --remaining-packages

override_dh_auto_build:
	dh_auto_build
	sed -i \
		-e 's,solar_theme,sphinx_rtd_theme,g' \
		-e 's,theme.theme_path,theme.get_html_theme_path(),g' \
		-e 's,version = meta_version("quart"),version = "$(DEB_VERSION_UPSTREAM)",g' \
		docs/conf.py
	$(MAKE) -C docs clean html SPHINXBUILD=sphinx-build SPHINXOPTS="$(SPHINXOPTS)"

override_dh_installexamples:
	dh_installexamples -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
	dh_installexamples --remaining-packages

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.rst

override_dh_compress:
	dh_compress -X.py

.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_installdocs override_dh_installexamples override_dh_installchangelogs override_dh_compress