File: rules

package info (click to toggle)
python-keyczar 0.6~b.061709%2Bsvn502-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 712 kB
  • sloc: python: 1,496; sh: 34; makefile: 27
file content (38 lines) | stat: -rwxr-xr-x 1,120 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
#!/usr/bin/make -f
# -*- makefile -*-

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

PYVERS = $(shell pyversions -r -v)

# For svn-orig-source.sh
PKGDIR = $(dir $(firstword $(MAKEFILE_LIST)))
UPNAME = $(shell dpkg-parsechangelog -l$(PKGDIR)/changelog | \
		sed -nre 's,^Source:\s+(.*),\1,p')
UPVER = $(shell dpkg-parsechangelog -l$(PKGDIR)/changelog | \
		sed -nre 's,^Version:\s+(.*)\+svn([0-9]+)-.*,\1,p')
SVNREV = $(shell dpkg-parsechangelog -l$(PKGDIR)/changelog | \
		sed -nre 's,^Version:\s+(.*)\+svn([0-9]+)-.*,\2,p')
SVNURL = http://keyczar.googlecode.com/svn/trunk/python/
export UPNAME UPVER SVNURL SVNREV

%:
	dh $@

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e ; \
	cd tests/keyczar/; \
	for py in $(PYVERS); do  \
		if [ "$$py" \< "2.6" ]; then \
			PYTHONPATH=$(CURDIR)/build/lib python$$py alltests.py; \
		else \
			PYTHONPATH=$(CURDIR)/build/lib.$(shell python -c 'import distutils.util as d; print d.get_platform()')-$$py python$$py alltests.py; \
    		fi; \
	done
endif

.PHONY: get-orig-source
get-orig-source:
	sh $(PKGDIR)/svn-orig-source.sh