File: rules

package info (click to toggle)
commonmark-bkrs 0.5.4%2Bds-7.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,264 kB
  • sloc: python: 3,667; makefile: 29; sh: 8
file content (39 lines) | stat: -rwxr-xr-x 1,321 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

PY3VERSION=$(shell py3versions -dv)

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

export PYBUILD_AFTER_BUILD = \
	rm -f build/scripts-{version.major} ;\
	ln -rsf build/scripts-$(PY3VERSION) build/scripts-{version.major} ;\
	ln -f build/scripts-{version}/cmark.py build/scripts-{version}/cmark-bkrs ;\
	mkdir -p build/scripts-{version}/tests ;\
	ln -f build/scripts-{version}/test-CommonMark.py build/scripts-{version}/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}/cmark-bkrs.1 \
		debian/adhoc/wrappers/python{version.major}/cmark-bkrs

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

%:
	dh $@ --with 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