File: rules

package info (click to toggle)
pdfminer 20181108%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 15,740 kB
  • sloc: python: 12,514; xml: 446; makefile: 182; sh: 6
file content (39 lines) | stat: -rwxr-xr-x 1,017 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
31
32
33
34
35
36
37
38
39
#!/usr/bin/make -f

export PYBUILD_NAME=pdfminer
export PYTHONWARNINGS=d
export PYBUILD_TEST_ARGS=pdfminer/*.py tests/test_pdfminer_*.py

debroot = debian/tmp/
py2_libdir = usr/lib/python2.7/dist-packages
py3_libdir = usr/lib/python3/dist-packages

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

override_dh_auto_build:
	$(MAKE) cmap
	dh_auto_build

override_dh_auto_install:
	pybuild --install -p 2.7
	pybuild --install -p 3

	# Provide the binaries only from Python3 package.
	rm debian/python-pdfminer/usr/bin/*.py

	# Move cmap files outside dist-packages
	mkdir -p $(debroot)/usr/share/pdfminer/
	mv debian/python-pdfminer/$(py2_libdir)/pdfminer/cmap/*.pickle.gz \
		$(debroot)/usr/share/pdfminer/

	rename.ul .py '' debian/python3-pdfminer/usr/bin/*.py
	# Remove cmap in Python3 package since we use the ones generated during
	# Python2 package build.
	rm -rf debian/python-pdfminer/$(py3_libdir)/pdfminer/cmap

override_dh_installman:
	$(MAKE) -C debian/manpages/
	dh_installman

# vim:ts=4 sw=4 noet