File: rules

package info (click to toggle)
allegro5 2%3A5.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,856 kB
  • ctags: 15,948
  • sloc: ansic: 87,540; cpp: 9,693; objc: 3,491; python: 2,057; sh: 829; makefile: 93; perl: 37; pascal: 24
file content (59 lines) | stat: -rwxr-xr-x 2,296 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
#!/usr/bin/make -f

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# Use this variable to allow options passed to cmake to be overridable.
# WANT_EXAMPLES is set to ON only to check if they build successfully,
# as their source is shipped in the doc package.
DEB_CMAKE_OPTIONS ?= -DCMAKE_VERBOSE_MAKEFILE=ON \
		-DCMAKE_INSTALL_PREFIX="/usr" \
		-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
                -DWANT_DEMO=OFF \
                -DWANT_EXAMPLES=ON \
                -DWANT_DOCS=ON \
                -DWANT_DOCS_HTML=ON \
                -DWANT_DOCS_MAN=ON

%:
	dh $@ --builddirectory=build --parallel

override_dh_auto_configure:
# Delete possibly non-free images/music.
	rm -rf examples/data/haiku demos
# Delete precompiled files.
	rm -rf docs/man/ docs/html/
	rm examples/data/DejaVuSans.*
	rm addons/audio/kcm_mixer_helpers.inc
	rm include/allegro5/opengl/GLext/*gl*_ext_alias.h
	rm src/convert.c include/allegro5/internal/aintern_convert.h
	rm src/scanline_drawers.*
	rm addons/primitives/directx_shaders.c
# Regenerate generated files.
	misc/regenerate.sh
	dh_auto_configure -- $(DEB_CMAKE_OPTIONS)

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/allegro5/platform
	mv debian/tmp/usr/include/allegro5/platform/alplatf.h debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/allegro5/platform/alplatf.h
	sed -i 's@Cflags: -I$${includedir}@Cflags: -I$${includedir}/$(DEB_HOST_MULTIARCH)@' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/allegro-*.pc

override_dh_auto_test:
	cd build && tests/test_driver --no-display ../tests/test_*.ini

override_dh_installchangelogs:
	dh_installchangelogs CHANGES-5.0.txt

override_dh_installexamples-indep:
	dh_installexamples
# Delete haiku example, because we are not shipping its data.
	rm debian/allegro5-doc/usr/share/doc/allegro5-doc/examples/ex_haiku.c
# Delete examples intended for other platforms.
	rm debian/allegro5-doc/usr/share/doc/allegro5-doc/examples/ex_gp2xwiz.c
	rm debian/allegro5-doc/usr/share/doc/allegro5-doc/examples/ex_iphone.c
# Fix permissions
	find debian/allegro5-doc/usr/share/doc/allegro5-doc/examples -type f -exec chmod 644 \{\} \+