File: rules

package info (click to toggle)
pygpgme 0.2-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 440 kB
  • sloc: ansic: 2,860; python: 1,389; makefile: 35; sh: 14
file content (54 lines) | stat: -rwxr-xr-x 1,754 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this line to make output verbose
#export DH_VERBOSE=1

PYVERS=$(shell pyversions -vr)
#PKGDIR=$(CURDIR)/debian/python-gpgme

#clean:
	# Enforce removal of *.pyc files. Apparently dh_clean does
	# not perform find on provided filename patterns.
#	rm -rf build/
#	find . -name *.pyc -exec rm -f {} \;
#	find . -name *.so -exec rm -f {} \;
#	dh_clean install-stamp build-stamp \
#		$(PYVERS:%=install-python%) $(PYVERS:%=build-python%) \
#		$(PYVERS:%=install-debug-python%) $(PYVERS:%=build-debug-python%)

override_dh_auto_clean:
	./setup.py clean
	dh_clean

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e -x;\
	for py in $(PYVERS); do \
		PYTHON=python$$py PYTHONPATH=$(CURDIR)/build/lib.*-$$py GPG_AGENT_INFO= make check ;\
		PYTHON=python$$py PYTHONPATH=$(CURDIR)/build/lib.*-$$py-pydebug GPG_AGENT_INFO= make check ;\
	done
endif

override_dh_install:
	# Install everything excluding the *_d.so debug extensions to python-gpgme
	dh_install -X"*_d.so" "debian/tmp/*" -p python-gpgme
	# Install the debug extensions to python-gpgme-dbg
	dh_install "debian/tmp/usr/lib/python*/*-packages/gpgme/*_d.so" -p python-gpgme-dbg
	# Continue with regular dh_install
	dh_install

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	# Stripped symbols go into python-gpgme-dbg
	dh_strip --dbg-package=python-gpgme-dbg
endif

get-orig-source:
	REV=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*bzr([0-9]{4})([0-9]{2})([0-9]{2}).*,\1-\2-\3,p'); \
	VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p'); \
	bzr export --root=pygpgme-$$VER -r date:$$REV ../pygpgme_$$VER.orig.tar.gz lp:pygpgme

%:
	dh $@ --with python2 -Spython_distutils