File: rules

package info (click to toggle)
allegro4.4 2%3A4.4.2-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,920 kB
  • ctags: 39,951
  • sloc: ansic: 164,225; asm: 17,620; cpp: 3,848; objc: 1,687; sh: 1,131; python: 676; pascal: 179; makefile: 48; perl: 29; lisp: 1
file content (66 lines) | stat: -rwxr-xr-x 2,371 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
#!/usr/bin/make -f

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

# Use this variable to allow options passed to cmake to be overridable.
# WANT_EXAMPLES and WANT_TESTS are 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)" \
		-DCMAKE_SKIP_RPATH:BOOL=ON \
		-DCMAKE_BUILD_TYPE=Release \
		-DWANT_MODULES=ON \
		-DWANT_OSS=ON \
		-DWANT_ALSA=ON \
		-DWANT_JACK=OFF \
		-DWANT_SGIAUDIO=OFF \
		-DWANT_LINUX_CONSOLE=OFF \
		-DWANT_ALLEGROGL=ON \
		-DWANT_LOADPNG=ON \
		-DWANT_LOGG=ON \
		-DWANT_JPGALLEG=ON \
		-DWANT_TOOLS=ON \
		-DWANT_EXAMPLES=ON \
		-DWANT_TESTS=ON

DOC_DIR ?= usr/share/doc/allegro4-doc/
DOC_INFO_DIR ?= usr/share/info/
DOC_HTML_DIR ?= usr/share/doc/allegro4-doc/html/
DOC_EXAMPLES_DIR ?= usr/share/doc/allegro4-doc/examples/

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

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CMAKE_OPTIONS)

override_dh_auto_install:
	$(MAKE) --directory=build install DESTDIR=$(CURDIR)/debian/tmp
# Move docs to proper location - fixes FSSTND-dir-in-usr
	mkdir -p $(CURDIR)/debian/tmp/$(DOC_DIR)
	mkdir -p $(CURDIR)/debian/tmp/$(DOC_INFO_DIR)
	mkdir -p $(CURDIR)/debian/tmp/$(DOC_HTML_DIR)
	mkdir -p $(CURDIR)/debian/tmp/$(DOC_EXAMPLES_DIR)
	cp $(CURDIR)/debian/tmp/usr/doc/allegro-4.4.2/* $(CURDIR)/debian/tmp/$(DOC_DIR)
	cp $(CURDIR)/debian/tmp/usr/info/allegro.info $(CURDIR)/debian/tmp/$(DOC_INFO_DIR)
	cp build/docs/html/* $(CURDIR)/debian/tmp/$(DOC_HTML_DIR)
# Create examples source tar.gz
	rm -rf build/tmp; mkdir build/tmp
	cp examples/*.c examples/*.h examples/*.dat examples/*.pcx examples/*.txt examples/*.ini tests/*.c build/tmp/
	cd build/tmp; tar zcvf source.tar.gz *
	cp build/tmp/source.tar.gz $(CURDIR)/debian/tmp/$(DOC_EXAMPLES_DIR)

override_dh_makeshlibs:
	dh_makeshlibs -Xalleg-alsadigi.so -Xalleg-alsamidi.so -Xalleg-dga2.so

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGES