File: rules

package info (click to toggle)
pygame 1.9.4.post1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,412 kB
  • sloc: ansic: 54,632; python: 28,791; objc: 334; php: 92; sh: 76; makefile: 36; cpp: 25
file content (53 lines) | stat: -rwxr-xr-x 1,985 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
#!/usr/bin/make -f

export PYBUILD_NAME = pygame

# Replace embedded font with system copy
export PYBUILD_AFTER_INSTALL = ln -sf /usr/share/fonts/truetype/freefont/FreeSansBold.ttf \
                                      {destdir}/{install_dir}/pygame/freesansbold.ttf

# setup.py only installs data during install, not build
export PYBUILD_BEFORE_TEST = cp {dir}/lib/pygame_icon.bmp {build_dir}/pygame; \
                             cp /usr/share/fonts/truetype/freefont/FreeSansBold.ttf \
                                {build_dir}/pygame/freesansbold.ttf; \
                             ln -sf {dir}/examples/data {build_dir}/pygame/examples; \
                             ln -sf {dir}/test/fixtures {build_dir}/pygame/tests/

export ORIGLIBDIRS := /lib:/lib/$(DEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_test:
	# buildds don't provide graphical interfaces or audio/video devices
	# to test with, hence some tests won't work properly without:
	SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=disk LC_ALL=C.UTF-8 \
		dh_auto_test -- --system=custom --test-args \
		'/usr/bin/xvfb-run {interpreter} -m pygame.tests.__main__ --exclude opengl'

override_dh_install:
	dh_install
	dh_numpy
	dh_numpy3
	rm -f debian/python*-pygame/usr/lib/python*/dist-packages/pygame/LGPL
	rm -rf debian/python*-pygame/usr/lib/python*/dist-packages/pygame/examples/
	rm -rf debian/python*-pygame/usr/lib/python*/dist-packages/pygame/tests/
	rm -rf debian/python*-pygame/usr/lib/python*/dist-packages/pygame/docs/
	for d in debian/python3-pygame/usr/include/python*; do \
		[ "$$d" = *m ] || mv "$$d" "$$d"m; \
	done

override_dh_installdocs:
	python3 setup.py build_sphinx
	dh_installdocs

override_dh_installchangelogs:
	dh_installchangelogs WHATSNEW

override_dh_compress:
	dh_compress -ppython-pygame-doc -Xexamples/
	dh_compress --remaining-packages