File: rules

package info (click to toggle)
pyx 0.9-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,064 kB
  • ctags: 2,665
  • sloc: python: 15,205; makefile: 142; ansic: 131
file content (93 lines) | stat: -rwxr-xr-x 2,278 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
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
#!/usr/bin/make -f
# $Id: rules 350 2003-09-24 02:26:28Z bob $
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess. 

docdir=/usr/share/doc/python-pyx-doc
versions=$(shell pyversions -r debian/control)

# noopt is handled in setup.py
# nostrip handled by dh_strip

build: build-stamp
build-stamp:
	dh_testdir
	for p in $(versions); do \
		$$p setup.py build_ext -g; \
	done
	touch build-stamp

clean:
	dh_testdir
	rm -f build-stamp
	for p in $(versions); do \
		$$p setup.py clean -a ; \
	done
	find -name \*.pyc -exec rm {} \;
	make -C faq clean
	make -C manual clean
	-rm -rf debian/output
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	for p in $(versions); do \
		$$p setup.py install --root=$(CURDIR)/debian/python-pyx --no-compile; \
	done

	for f in `find $(CURDIR)/debian/python-pyx -name \*.py`; do \
		sed -e '\,^#!/usr/bin/env $(python)$$,d' < $$f > $$f.tmp; \
		mv $$f.tmp $$f; \
	done

doc:
	dh_testdir
	make -C faq pdf
	make -C manual pdf

# Build architecture-independent files here.
binary-indep: install doc
	dh_testdir
	dh_testroot
	install -D -o root -g root -m 0644 manual/manual.pdf $(CURDIR)/debian/python-pyx-doc/$(docdir)/manual.pdf
	install -D -o root -g root -m 0644 faq/pyxfaq.pdf $(CURDIR)/debian/python-pyx-doc/$(docdir)/pyxfaq.pdf
	find gallery examples \( -name "*.py" -o -name "*.dat" \) \
		-exec install -D -m 0644 {} $(CURDIR)/debian/python-pyx-doc/usr/share/doc/python-pyx-doc/{} \;; \
	dh_installchangelogs -i CHANGES
	dh_installdocs -i -A README AUTHORS
	dh_link -i
	dh_compress -i -Xmanual.pdf -Xpyxfaq.pdf
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs -a CHANGES
	dh_installdocs -a -A README AUTHORS
	for p in $(versions); do \
		install -m 0644 debian/siteconfig.py debian/python-pyx/usr/lib/$$p/site-packages/pyx; \
	done
	dh_pycentral
	dh_link -a
	dh_strip
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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

# vim:ts=4:sw=4: