File: rules

package info (click to toggle)
python3-profiler 3.1.3-1
  • links: PTS
  • area: non-free
  • in suites: squeeze
  • size: 88 kB
  • ctags: 113
  • sloc: python: 893; makefile: 47; sh: 16
file content (61 lines) | stat: -rwxr-xr-x 1,428 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
#!/usr/bin/make -f
# -*- makefile -*-

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

v	:= $(shell python -c 'import sys; print sys.version[:3]')
#vers	:= $(shell pyversions -vr debian/control)
vers	:= 3.1

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/python3-profiler/usr/lib/python$$v; \
	  cp -p $$v/* debian/python3-profiler/usr/lib/python$$v/; \
	  for i in `find debian/python3-profiler/usr/lib/python$$v -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
	dh_compress -i -X.doc
	dh_fixperms -i
	( \
	  echo 'python3:Depends=python3 (>= 3.1), python3 (<< 3.2)'; \
	  echo 'python3:Versions=3.1'; \
	) >> debian/python3-profiler.substvars
	dh_installdeb -i
	dh_gencontrol -i
	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