1SUMMARY="Airhockey with tux (Shufflepuck Caf�� clone)"
2DESCRIPTION="Open source Shufflepuck Caf�� clone, with tux and arcana"
3HOMEPAGE="https://wiki.debian.org/Games/TuxPuck"
4COPYRIGHT="2000-2002 Jacob Kroon"
5LICENSE="GNU GPL v2"
6REVISION="2"
7SOURCE_URI="http://ftp.de.debian.org/debian/pool/main/t/tuxpuck/tuxpuck_$portVersion.orig.tar.gz"
8CHECKSUM_SHA256="62d9604ed69c27b9ca2be1312bc705b36de8ed509c539c6d81193e7846272f18"
9SOURCE_DIR="tuxpuck-$portVersion"
10PATCHES="buffer-overflow.patch
11	clang-FTBFS.patch
12	FTBFS-with-fread.patch
13	libpng-transition.patch
14	Makefile.patch
15	cross.patch
16	haiku.patch"
17ADDITIONAL_FILES="tuxpuck.rdef.in"
18
19ARCHITECTURES="all !x86_gcc2"
20SECONDARY_ARCHITECTURES="x86"
21
22PROVIDES="
23	tuxpuck$secondaryArchSuffix = $portVersion
24	app:TuxPuck = $portVersion
25	"
26REQUIRES="
27	haiku$secondaryArchSuffix
28	lib:libSDL_1.2$secondaryArchSuffix
29	lib:libfreetype$secondaryArchSuffix
30	lib:libjpeg$secondaryArchSuffix
31	lib:libpng16$secondaryArchSuffix
32	lib:libvorbis$secondaryArchSuffix
33	"
34
35BUILD_REQUIRES="
36	haiku${secondaryArchSuffix}_devel
37	devel:libSDL_1.2$secondaryArchSuffix
38	devel:libfreetype$secondaryArchSuffix
39	devel:libjpeg$secondaryArchSuffix
40	devel:libpng$secondaryArchSuffix
41	devel:libvorbis$secondaryArchSuffix
42	"
43BUILD_PREREQUIRES="
44	cmd:gcc$secondaryArchSuffix
45	cmd:make
46	cmd:pkg_config$secondaryArchSuffix
47	"
48
49BUILD()
50{
51	make
52}
53
54INSTALL()
55{
56	mkdir -p $appsDir $manDir/man6
57	cp tuxpuck $appsDir/TuxPuck
58	cp man/tuxpuck.6.gz $manDir/man6
59
60	local APP_SIGNATURE="application/x-vnd.tuxpuck"
61	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
62	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
63	local MINOR="`echo "$portVersion" | cut -d. -f3`"
64	local LONG_INFO="$SUMMARY"
65	sed \
66		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
67		-e "s|@MAJOR@|$MAJOR|" \
68		-e "s|@MIDDLE@|$MIDDLE|" \
69		-e "s|@MINOR@|$MINOR|" \
70		-e "s|@LONG_INFO@|$LONG_INFO|" \
71		$portDir/additional-files/tuxpuck.rdef.in > $sourceDir/tuxpuck.rdef
72
73	addResourcesToBinaries  $sourceDir/tuxpuck.rdef \
74		$appsDir/TuxPuck
75
76	addAppDeskbarSymlink $appsDir/TuxPuck
77}
78