File: rules

package info (click to toggle)
commonmark-bkrs 0.5.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,192 kB
  • sloc: python: 3,661; makefile: 29; sh: 8
file content (40 lines) | stat: -rwxr-xr-x 1,399 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
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/make -f

DEB_PKG_VERSION ?= $(shell dpkg-parsechangelog -S Version)

H2MFLAGS = \
	--manual="CommonMark Python package (Bibek Kafle and Roland Shoemaker)" \
	--source="CMark-BKRS (Debian $(DEB_PKG_VERSION))" \
	--version-string="CMark-BKRS - $(DEB_PKG_VERSION)" \
	--no-info

export PYBUILD_AFTER_BUILD = \
	ln -rsf build/scripts-{version} build/scripts-{version.major} ;\
	ln -f build/scripts-{version}/cmark.py build/scripts-{version.major}/cmark-bkrs ;\
	mkdir -p build/scripts-{version.major}/tests ;\
	ln -f build/scripts-{version.major}/test-CommonMark.py build/scripts-{version.major}/tests/test-CommonMark.py

export PYBUILD_AFTER_INSTALL = \
	LC_ALL=C PYTHONPATH={build_dir} help2man $(H2MFLAGS) -s 1 \
			-I debian/man/cmark-bkrs.h2m \
			-n "pure Python script parser for the CommonMark Markdown spec" \
			-o build/scripts-{version.major}/cmark-bkrs.1 \
		debian/adhoc/wrappers/python{version.major}/cmark-bkrs

default:
	@uscan --no-conf --dehs --report || true

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

override_dh_installdocs:
	dh_installdocs --all debian/README.Debian

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} CommonMark/test/test-CommonMark.py" dh_auto_test

override_dh_compress:
	dh_compress -XREADME.md -Xspec.txt -Xexamples

get-orig-source:
	uscan --no-conf --download-current-version --compression xz --verbose