File: rules

package info (click to toggle)
supertuxkart 0.9.2+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 690,864 kB
  • ctags: 71,925
  • sloc: cpp: 330,845; ansic: 126,319; xml: 45,378; sh: 13,074; asm: 1,532; makefile: 1,080; python: 878; awk: 609; objc: 452; perl: 104
file content (91 lines) | stat: -rwxr-xr-x 3,488 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

ifeq ($(findstring parallel=,$(DEB_BUILD_OPTIONS)),)
	export DEB_BUILD_OPTIONS+=parallel=$(shell getconf _NPROCESSORS_ONLN)
endif

export DEB_LDFLAGS_MAINT_APPEND=-lGLU

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog \
                          | sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p')
SOURCE_DATE := $(shell dpkg-parsechangelog --show-field=Date)

%:
	dh $@ --buildsystem=cmake --parallel

override_dh_auto_clean:
	$(MAKE) -C lib/irrlicht/source/Irrlicht clean
	
	# Remove embedded libraries used by embedded Irrlicht
	rm -rf lib/jpeglib/
	rm -rf lib/zlib/
	rm -rf lib/libpng/
	
	dh_auto_clean

override_dh_auto_configure:	
	# libbluetooth-dev is only available on linux, hence build with
	# wiimote input device support only on linux
	if [ $(DEB_HOST_ARCH_OS) = linux ]; then \
	dh_auto_configure -- -DCMAKE_BUILD_TYPE="STKRelease" \
	                     -DSTK_INSTALL_BINARY_DIR="games" \
	                     -DSTK_INSTALL_DATA_DIR="share/games/supertuxkart"; \
	else \
	dh_auto_configure -- -DCMAKE_BUILD_TYPE="STKRelease" \
	                     -DSTK_INSTALL_BINARY_DIR="games" \
	                     -DSTK_INSTALL_DATA_DIR="share/games/supertuxkart" \
	                     -DUSE_WIIUSE=OFF; \
	fi

override_dh_auto_build:
	# Generate manual page	 
	docbook-to-man debian/supertuxkart.sgml > debian/supertuxkart.6
	
	dh_auto_build

override_dh_install:
	# Licenses are all documented in debian/copyright
	find $(CURDIR)/debian/tmp \( -iname "LICENSE" -o -iname "License.txt" \
	-o -iname "license2.txt" -o -iname "License.Debian.txt" -o -iname \
	"Music_license.rtf" \) -delete
	
	# cmake installs some unneeded autotools-related files as well
	find $(CURDIR)/debian/tmp \( -iname "Makefile.am" -o -iname \
	"Makefile.in" \) -delete
	
	# Remove unneeded (developer) scripts in data directory
	find $(CURDIR)/debian/tmp \( -iname "run_me.sh" -o -iname \
	"optimize_data.sh" -o -iname "check.sh" -o -iname \
	"pull_from_transifex.sh" \) -delete
	
	# Install hi-res icon into /usr/share/pixmaps. LP: #937976
	install -m 644 $(CURDIR)/debian/tmp/usr/share/games/supertuxkart/data/gui/karts.png \
	$(CURDIR)/debian/tmp/usr/share/pixmaps/supertuxkart.png
	mkdir -p $(CURDIR)/debian/tmp/usr/share/icons/hicolor/32x32/apps
	install -m 644 $(CURDIR)/debian/tmp/usr/share/pixmaps/supertuxkart_32.png \
	$(CURDIR)/debian/tmp/usr/share/icons/hicolor/32x32/apps/supertuxkart.png
	mkdir -p $(CURDIR)/debian/tmp/usr/share/icons/hicolor/128x128/apps
	install -m 644 $(CURDIR)/debian/tmp/usr/share/pixmaps/supertuxkart_128.png \
	$(CURDIR)/debian/tmp/usr/share/icons/hicolor/128x128/apps/supertuxkart.png
	
	dh_install --list-missing -Xgitignore -Xgitattributes

override_dh_strip:
	dh_strip --dbg-package=supertuxkart-dbg

get-orig-source:
	mkdir -p ../repack
	uscan --force-download --destdir ../repack --download-version $(DEB_UPSTREAM_VERSION)
	( \
		cd ../repack ;\
		tar -xJf supertuxkart-$(DEB_UPSTREAM_VERSION)-src.tar.xz ;\
		cd supertuxkart-$(DEB_UPSTREAM_VERSION) ;\
		#830751 - remove Ubuntu font family fonts ;\
		# also see debian/patches/replace-fonts-ubuntu-with-cantarell.patch ;\
		rm -rf data/ttf/Ubuntu*.ttf data/ttf/ubuntu-font-licence-1.0.txt ;\
		cd .. ;\
		tar --mtime="$(SOURCE_DATE)" -cJf supertuxkart_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.xz supertuxkart-$(DEB_UPSTREAM_VERSION) ;\
		mv supertuxkart_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.xz .. ;\
	)
	rm -rf ../repack