File: rules

package info (click to toggle)
python-pyvcf 0.6.8%2Bgit20170215.476169c-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,604 kB
  • sloc: python: 2,929; makefile: 124; sh: 19
file content (35 lines) | stat: -rwxr-xr-x 1,217 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PYBUILD_NAME=vcf
examplesdir=debian/python-py$(PYBUILD_NAME)-examples/usr/share/doc/python3-$(PYBUILD_NAME)
helperdir=debian/py$(PYBUILD_NAME)/usr

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

override_dh_install:
	dh_install
	# move testdata to separate dir
	mkdir -p $(examplesdir)
	mv `find debian/python3-$(PYBUILD_NAME) -type d -name test | head -n 1` $(examplesdir)
	find debian/python3-$(PYBUILD_NAME) -type d -name test | xargs rm -rf
	find $(examplesdir) -name "__pycache__" | xargs rm -rf
	mkdir -p $(helperdir)
	mv debian/python3-$(PYBUILD_NAME)/usr/bin $(helperdir)
	# strip .py extension
	for py in $(helperdir)/bin/*.py ; do \
	    mv $${py} $(helperdir)/bin/`basename $${py} .py` ; \
	done

override_dh_python3:
	dh_python3 --verbose
# parser.py is different for Python3 versions - so do not fiddle around with this
#	# No idea why this installs to python3.7 but should rather be python3
#	vcfp3dir=`find debian/*/usr/lib -type d -name python3.7` ; \
#	if [ "$${vcfp3dir}" != "" ] ; then mv $${vcfp3dir} `dirname $${vcfp3dir}`/python3 ; fi