File: rules

package info (click to toggle)
pyogg 1.3%2Brepack-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 248 kB
  • ctags: 153
  • sloc: ansic: 980; python: 227; makefile: 70; sh: 15
file content (100 lines) | stat: -rwxr-xr-x 2,379 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
98
99
100
#!/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

include /usr/share/quilt/quilt.make

PYVERS := $(shell pyversions -r)

build: patch build-stamp build-debug-stamp
build-stamp:
	dh_testdir

	set -e; \
	for py in $(PYVERS); do \
	    $$py config_unix.py --prefix /usr; \
	    $$py setup.py build;               \
	done

	touch build-stamp

build-debug-stamp:
	dh_testdir

	set -e; \
	for py in $(PYVERS); do \
	    $$py-dbg config_unix.py --prefix /usr; \
	    $$py-dbg setup.py build;               \
	done

	touch build-debug-stamp

clean: unpatch
	dh_testdir
	dh_testroot

	#if [ -f Setup ] ; then python setup.py clean --all ; fi
	-for py in $(PYVERS); do \
	    $$py setup.py clean --all; \
	    $$py-dbg setup.py clean --all; \
	done

	[ ! -d build ] || rm -rf build

	dh_clean build*-stamp configure-stamp Setup

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	for py in $(PYVERS); do        \
	    $$py setup.py install --root=$(CURDIR)/debian/python-ogg --install-layout=deb; \
	done

	for py in $(PYVERS); do        \
	    $$py-dbg setup.py install --root=$(CURDIR)/debian/python-ogg-dbg --install-layout=deb; \
	done
	find debian/python-*-dbg ! -type d ! -name '*.so' | xargs rm -f
	find debian/python-*-dbg -depth -empty -exec rmdir {} \;
	for py in $(PYVERS); do        \
	    rm -rf debian/python-ogg-dbg/usr/include/$$py; \
	    mkdir -p debian/python-ogg-dbg/usr/include/$${py}_d; \
	    ln -s ../$$py/pyogg debian/python-ogg-dbg/usr/include/$${py}_d/pyogg; \
	done


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installchangelogs ChangeLog
	dh_pysupport
	dh_link
	dh_strip -ppython-ogg --dbg-package=python-ogg-dbg
	rm -rf debian/python-ogg-dbg/usr/share/doc/python-ogg-dbg
	ln -s python-ogg debian/python-ogg-dbg/usr/share/doc/python-ogg-dbg
	dh_compress
	dh_fixperms
	dh_makeshlibs -V
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

get-orig-source:
	uscan --verbose --rename --repack --force-download

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