File: rules

package info (click to toggle)
pdfminer 20200726-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,716 kB
  • sloc: python: 13,377; xml: 423; makefile: 95; sh: 3
file content (31 lines) | stat: -rwxr-xr-x 692 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
#!/usr/bin/make -f

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

debroot = debian/tmp/
py3_libdir = usr/lib/python3/dist-packages

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

override_dh_auto_build:
	$(MAKE) cmap
	dh_auto_build

override_dh_auto_install:
	pybuild --install -p 3

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

	rename 's/\.py$$//' debian/python3-pdfminer/usr/bin/*.py

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

# vim:ts=4 sw=4 noet