File: rules

package info (click to toggle)
pygame 1.8.1release-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,476 kB
  • ctags: 4,574
  • sloc: ansic: 28,660; python: 13,523; makefile: 61; sh: 1
file content (86 lines) | stat: -rwxr-xr-x 2,044 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

PYVERS=$(shell pyversions -r debian/control)

ifeq (noopt,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	for python in $(PYVERS); \
		do CFLAGS="$(CFLAGS)" $$python config.py; \
	done
	touch $@

build: build-stamp
build-stamp:
	dh_testdir
	for python in $(PYVERS); \
		do $$python setup.py build; \
	done
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# We ignore errors, as if the build is already clean
	# (Setup has been removed) this command doesn't run
	-for python in $(PYVERS); \
		do $$python setup.py clean; \
	done
	# Other files that setup.py clean doesn't remove.
	rm -f *.pyc
	rm -fr build
	rm -f Setup

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	for python in $(PYVERS); \
		do $$python setup.py install \
			--root=$(CURDIR)/debian/python-pygame --prefix=/usr; \
	done

# We include all the documentation except:
# util (which is for building the docs from the source)
# fullinstall.txt (which is installation instructions)
# LGPL (which is in /usr/share/common-licenses/LGPL under Debian)
doclist = $(filter-out docs/util docs/fullinstall.txt docs/LGPL,$(wildcard docs/*))

binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a $(doclist)
	dh_installchangelogs -a WHATSNEW
	dh_bugfiles -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_pycentral -a
	#fix permission, replace freesansbold.ttf
	cd $(CURDIR)/debian/python-pygame/usr/share/pyshared/pygame/ && chmod a-x pygame_icon* pygame.ico && rm freesansbold.ttf && ln -s  /usr/share/fonts/truetype/freefont/FreeSansBold.ttf freesansbold.ttf
	# fix above link as well
	dh_link -a

	dh_installdeb -a
	dh_shlibdeps -a 
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep:

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