File: rules

package info (click to toggle)
python-watchdog 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 684 kB
  • sloc: python: 4,308; ansic: 369; xml: 155; makefile: 128
file content (30 lines) | stat: -rwxr-xr-x 1,136 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
#!/usr/bin/make -f

export PYBUILD_NAME=watchdog

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

override_dh_clean:
	dh_clean
	rm -rf docs/build .pytest_cache .coverage .pybuild

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	sphinx-build -b man docs/source docs/build/man
	sed -i 's/.TH "WATCHDOG" "1"/.TH "WATCHDOG" "3"/g' docs/build/man/watchdog.1
	cp -f docs/build/man/watchdog.1 docs/build/man/watchdog3.1
	PYTHONPATH=. sphinx-build -b html docs/source $(CURDIR)/debian/python-watchdog/usr/share/doc/python-watchdog/html
	PYTHONPATH=. sphinx-build -b html docs/source $(CURDIR)/debian/python3-watchdog/usr/share/doc/python3-watchdog/html
	dh_sphinxdoc -O--buildsystem=pybuild
endif

override_dh_installdocs:
	dh_installdocs
	dh_installdocs -A AUTHORS

override_dh_install:
	mv debian/python3-watchdog/usr/bin/watchmedo debian/python3-watchdog/usr/bin/watchmedo3
	sed -i 's#/usr/bin/python[2-3]#/usr/bin/python2#' debian/python-watchdog/usr/bin/watchmedo
	sed -i 's#/usr/bin/python[2-3]#/usr/bin/python3#' debian/python3-watchdog/usr/bin/watchmedo3
	dh_install -O--buildsystem=pybuild