File: rules

package info (click to toggle)
citeproc-py 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,024 kB
  • sloc: xml: 13,196; python: 3,488; makefile: 20; sh: 4
file content (30 lines) | stat: -rwxr-xr-x 1,048 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 DH_VERBOSE=1
export PYBUILD_NAME=citeproc

VERSION := $(shell dpkg-parsechangelog -Sversion | cut -d- -f1)
DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +"%F" -f -)

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

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -m pytest -v -x && rm -rf .cache" dh_auto_test

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/python-citeproc/usr/bin # don't contribute csl_unsorted in both packages 

override_dh_installdocs:
	dh_installdocs -A README.rst

override_dh_installexamples:
	dh_installexamples -A examples/*
	sed -i 's/usr\/bin\/env\ python/usr\/bin\/env\ python3/' debian/python3-citeproc/usr/share/doc/python3-citeproc/examples/*py

override_dh_installman:
	txt2man -s 1 -v "python3-citeproc" -t "csl_unsorted" -r "$(VERSION)" -d "$(DEBDATE)" debian/csl_unsorted.txt > .pybuild/csl_unsorted.1
	dh_installman -ppython3-citeproc .pybuild/csl_unsorted.1

override_dh_compress:
	dh_compress -X.py -X.bib # save examples