File: rules

package info (click to toggle)
libtpclient-py 0.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 444 kB
  • ctags: 849
  • sloc: python: 5,260; makefile: 49
file content (74 lines) | stat: -rwxr-xr-x 1,577 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/make -f
# -*- makefile -*-

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

include /usr/share/quilt/quilt.make
-include /usr/share/python/python.mk

PYVERS=$(shell pyversions -r)

build: build-stamp
build-stamp: patch
	dh_testdir

	set -e; \
	for PYTHON in $(PYVERS); do \
		$$PYTHON setup.py build; \
	done

	touch $@

_clean: $(QUILT_STAMPFN)
	dh_testdir
	dh_testroot

	rm -rf build-stamp

	set -e; \
	for PYTHON in $(PYVERS); do \
		$$PYTHON setup.py clean; \
	done

	find ./ -name '*.py[co]' -delete


clean: _clean unpatch
	dh_clean 
	rm -rf build

install-%-stamp: build
	dh_testdir
	dh_testroot

	$* ./setup.py install --no-compile --root=debian/python-tp-client \
		--prefix=/usr --install-lib=/usr/lib/$*/$(call py_sitename, $*)
	#Don't ship tp/__init__.py it is in libtpproto which this depends on.
	rm -f $(CURDIR)/debian/python-tp-client/usr/lib/$*/$(call py_sitename, $*)/tp/__init__.py

	touch $@

install: $(PYVERS:%=install-%-stamp)

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_compress
	dh_fixperms
	dh_pysupport
	chmod +x debian/python-tp-client/usr/share/pyshared/tp/client/pyscheme/all_tests.py
	chmod +x debian/python-tp-client/usr/share/pyshared/tp/client/pyscheme/scheme.py
	chmod +x debian/python-tp-client/usr/share/pyshared/tp/client/pyscheme/test_scheme.py
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install
# We have nothing to do by default.

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install