File: rules

package info (click to toggle)
python-unit 1.4.1-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 324 kB
  • ctags: 232
  • sloc: python: 844; sh: 84; makefile: 67
file content (97 lines) | stat: -rwxr-xr-x 2,328 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This is the debhelper compatability version to use.
export DH_COMPAT=4

P21U=debian/python2.1-unit
P22U=debian/python2.2-unit
P23U=debian/python2.3-unit
ADDON=debian/add-on

build: build-stamp
build-stamp:
	dh_testdir

	## Build for all python versions
	python2.1 setup.py build
	python2.2 setup.py build
	python2.3 setup.py build

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	rm -rf build
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	## Python 2.1
	python2.1 setup.py install --prefix=$(P21U)/usr --no-compile
	for i in $(P21U)/usr/lib/python2.1/site-packages/*; do\
		tail +2 $$i > $$i.new;\
		mv $$i.new $$i;\
	done
	cp -R doc/* $(P21U)/usr/share/doc/python2.1-unit/html
	cp -f $(ADDON)/*.html $(P21U)/usr/share/doc/python2.1-unit/html
	cp $(ADDON)/unittestgui.python2.1 $(P21U)/usr/bin/
	cp -R examples/* $(P21U)/usr/share/doc/python2.1-unit/examples

	## Python 2.2
	python2.2 setup.py install --prefix=$(P22U)/usr --no-compile
	for i in $(P22U)/usr/lib/python2.2/site-packages/*; do\
		tail +2 $$i > $$i.new;\
		mv $$i.new $$i;\
	done
	cp -R doc/* $(P22U)/usr/share/doc/python2.2-unit/html
	cp -f $(ADDON)/*.html $(P22U)/usr/share/doc/python2.2-unit/html
	cp $(ADDON)/unittestgui.python2.2 $(P22U)/usr/bin
	cp -R examples/* $(P22U)/usr/share/doc/python2.2-unit/examples

	## Python 2.3
	python2.3 setup.py install --prefix=$(P23U)/usr --no-compile
	for i in $(P23U)/usr/lib/python2.3/site-packages/*; do\
		tail +2 $$i > $$i.new;\
		mv $$i.new $$i;\
	done
	cp -R doc/* $(P23U)/usr/share/doc/python2.3-unit/html
	cp -f $(ADDON)/*.html $(P23U)/usr/share/doc/python2.3-unit/html
	cp $(ADDON)/unittestgui.python2.3 $(P23U)/usr/bin
	cp -R examples/* $(P23U)/usr/share/doc/python2.3-unit/examples


# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installman
	dh_installchangelogs CHANGES
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: 
# nothing to do

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