File: rules

package info (click to toggle)
python-pathtools 0.1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 184 kB
  • sloc: python: 193; makefile: 127
file content (30 lines) | stat: -rwxr-xr-x 680 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

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


override_dh_installchangelogs:
	if [ -e $(CURDIR)/debian/CHANGELOG ] ; then \
		dh_installchangelogs $(CURDIR)/debian/CHANGELOG ; \
	else \
		dh_installchangelogs ; \
	fi

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	sphinx-build -b man docs/source docs/build/man
	sed -i 's/.TH "PATHTOOLS" "1"/.TH "PATHTOOLS" "3"/g' docs/build/man/pathtools.1
	cp docs/build/man/pathtools.1 docs/build/man/pathtools3.1

endif

override_dh_installman:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	dh_installman
endif

override_dh_clean:
	dh_clean
	rm -rf build
	rm -rf docs/build