File: rules

package info (click to toggle)
python-ctypeslib 0.0.0%2Bsvn20100125-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 344 kB
  • ctags: 398
  • sloc: python: 2,845; makefile: 38
file content (55 lines) | stat: -rwxr-xr-x 1,921 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

PYVERS=$(shell pyversions -vr debian/control)
PACKAGE = python-ctypeslib
UPSTR_VERSION = $(shell dpkg-parsechangelog --count 1 | \
                     grep 'Version: ' | \
                     sed --regexp-extended 's/Version: ([^-]+)-.+/\1/' )
SVN_DATE = $(shell echo $(UPSTR_VERSION) | \
                     sed --regexp-extended 's/.*\+svn([0-9]+).*/\1/' )
TARBALL = $(PACKAGE)_$(UPSTR_VERSION).orig.tar.gz

get-orig-source:
	rm -rf get-orig-source
	mkdir get-orig-source
	svn export --revision '{$(SVN_DATE)}' \
	    http://svn.python.org/projects/ctypes/trunk/ctypeslib/ \
	    get-orig-source/$(PACKAGE)_$(UPSTR_VERSION).orig/
	GZIP=--best tar czf $(TARBALL) \
	           -C get-orig-source $(PACKAGE)_$(UPSTR_VERSION).orig/
	rm -rf get-orig-source
	@echo "--> $(TARBALL) created, move it where you want."

build:
	dh build
#	 `setup.py test` doesn't return false on failure yet, needs to be fixed
	for VER in $(PYVERS) ; do \
	    python$${VER} setup.py test ; \
	done

binary:
	dh binary --until dh_install #pysupport
#	python -c 'print "x"*5000'
#	dh_install
	mv debian/python-ctypeslib/usr/bin/h2xml.py \
           debian/python-ctypeslib/usr/bin/h2xml
	mv debian/python-ctypeslib/usr/bin/xml2py.py \
           debian/python-ctypeslib/usr/bin/xml2py
	dh binary --until dh_installman
	ln -s ctypeslib.1.gz \
	      debian/python-ctypeslib/usr/share/man/man1/h2xml.1.gz
	ln -s ctypeslib.1.gz \
	      debian/python-ctypeslib/usr/share/man/man1/xml2py.1.gz
	dh binary

%:
	dh $@