File: rules

package info (click to toggle)
python-tinycss2 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 832 kB
  • sloc: python: 2,527; makefile: 21; sh: 6
file content (31 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

export PYBUILD_NAME=tinycss2
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/.coverage

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

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/python-tinycss2-common/usr/share/python-tinycss2-common
	cp -r tests/css-parsing-tests debian/python-tinycss2-common/usr/share/python-tinycss2-common/css-parsing-tests
	rm -f debian/python-tinycss2-common/usr/share/python-tinycss2-common/css-parsing-tests/LICENSE
	rm -f debian/python-tinycss2-common/usr/share/python-tinycss2-common/css-parsing-tests/README.rst

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html -N docs/ $(CURDIR)/debian/python-tinycss2-doc/usr/share/doc/python-tinycss2-doc/html
	cp $(CURDIR)/debian/docs.css $(CURDIR)/debian/python-tinycss2-doc/usr/share/doc/python-tinycss2-doc/html/_static
	cp $(CURDIR)/debian/favicon.png $(CURDIR)/debian/python-tinycss2-doc/usr/share/doc/python-tinycss2-doc/html/_static
	dh_sphinxdoc
endif

override_dh_clean:
	rm -rf docs/.build
	dh_clean