File: rules

package info (click to toggle)
natsort 7.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 596 kB
  • sloc: python: 4,347; makefile: 19; sh: 4
file content (30 lines) | stat: -rwxr-xr-x 888 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
#!/usr/bin/make -f
# -*- makefile -*-

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

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

export PYBUILD_NAME=$(DEB_SOURCE)

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

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/natsort.1
	rm -f debian/upstream.changelog
	rm -rf docs/_build

override_dh_installchangelogs:
	cat README.rst | grep -A 10000 History > debian/upstream.changelog
	dh_installchangelogs debian/upstream.changelog

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/python-natsort/usr/bin
	PYTHONPATH=$(CURDIR) help2man --version-string="$(DEB_VERSION_UPSTREAM)" -n "Natural sorting for shell" debian/python3-natsort/usr/bin/natsort > debian/natsort.1
	set -ex; \
		cd docs; \
		python3 -m sphinx -C -b html -Dmaster_doc=index -Dmathjax_path=/usr/share/javascript/mathjax/MathJax.js . _build/html;