File: rules

package info (click to toggle)
python-profiler 2-3
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 328 kB
  • ctags: 412
  • sloc: python: 3,129; makefile: 57
file content (72 lines) | stat: -rwxr-xr-x 1,737 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
#!/usr/bin/make -f
# -*- makefile -*-

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

v	= 2.3
vers	= 2.1 2.2 2.3 2.4

v21	= 2.1.3
v22	= 2.2.3
v23	= 2.3.5
v24	= 2.4
vdef	= $(v23)

debrel	:= $(shell dpkg-parsechangelog | sed -n 's/^Version:.*-//p')

build:

clean:
	dh_testdir
	dh_testroot
	-find -name '*.py[co]' | xargs rm -f
	dh_clean 

install: install-indep
install-indep:
	dh_testdir
	dh_testroot
	dh_clean -k -i 
	dh_installdirs -i
	for v in $(vers); do \
	  mkdir -p debian/python$$v-profiler/usr/lib/python$$v; \
	  cp -p $$v/* debian/python$$v-profiler/usr/lib/python$$v/; \
	  for i in `find debian/python$$v-profiler -type f`; do \
	    sed "1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python$$v\1," \
		$$i > $$i.temp; \
	    if cmp --quiet $$i $$i.temp; then \
	      rm -f $$i.temp; \
	    else \
	      mv -f $$i.temp $$i; \
	      chmod 755 $$i; \
	      echo "fixed interpreter: $$i"; \
	    fi; \
	  done; \
	done

binary-indep: install-indep
	dh_testdir
	dh_testroot
	dh_installchangelogs -i
	dh_installdocs -i
	rm -rf debian/python-profiler/usr/share/doc/python-profiler
	ln -sf python$(v)-profiler \
		debian/python-profiler/usr/share/doc/python-profiler
	dh_compress -i
	dh_fixperms -i
	dh_python -i
	dh_installdeb -i
	dh_gencontrol -ppython-profiler -- -v$(vdef)-$(debrel)
	dh_gencontrol -ppython2.1-profiler -- -v$(v21)-$(debrel)
	dh_gencontrol -ppython2.2-profiler -- -v$(v22)-$(debrel)
	dh_gencontrol -ppython2.3-profiler -- -v$(v23)-$(debrel)
	dh_gencontrol -ppython2.4-profiler -- -v$(v24)-$(debrel)
	dh_md5sums -i
	dh_builddeb -i

# Build architecture dependant packages using the common target.
binary-arch:

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