aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xonotic/APKBUILD
blob: 459af3e110a54253fc50d5d1c4380c6c9fd4d100 (plain)
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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer:
pkgname=xonotic
pkgver=0.8.0
pkgrel=0
pkgdesc="Game engine for Xonotic (quake1/nexuiz derivative)"
url="http://www.xonotic.org/"
arch="x86 x86_64"
license="GPL2+"
depends="xonotic-data"
depends_dev="sdl-dev mesa-dev jpeg-dev libvorbis-dev libxpm-dev libxxf86dga-dev
			libxxf86vm-dev libmodplug-dev libpng-dev alsa-lib-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-glx $pkgname-sdl"
source="http://dl.xonotic.org/xonotic-${pkgver}-source.zip
	xonotic-moncontrol.patch"

_builddir="$srcdir"/Xonotic
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	# msg "building Xonotic-patched QuakeC compiler"
	# make -C "$_builddir"/source/fteqcc CPUOPTIMIZATIONS="${CFLAGS}"

	local r
	for r in sv cl sdl; do
		make -C "$_builddir"/source/darkplaces \
			CPUOPTIMIZATIONS="$CFLAGS" \
			DP_FS_BASEDIR="/usr/share/$pkgname" \
			DP_LINK_TO_LIBJPEG=1 \
			$r-release || return 1
	done
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	install -Dm755 "$_builddir"/source/darkplaces/darkplaces-dedicated \
		"$pkgdir"/usr/bin/xonotic-dedicated || return 1
}

sdl() {
	pkgdesc="$pkgdesc (SDL client)"
	mkdir -p "$subpkgdir"/usr/bin
	install -Dm755 "$_builddir"/source/darkplaces/darkplaces-sdl \
		"$subpkgdir"/usr/bin/xonotic-sdl || return 1
}

glx() {
	pkgdesc="$pkgdesc (GLX client)"
	mkdir -p "$subpkgdir"/usr/bin
	install -Dm755 "$_builddir"/source/darkplaces/darkplaces-glx \
		"$subpkgdir"/usr/bin/xonotic-glx || return 1
}

md5sums="2715a0b219239211cff9bc24d693e1c5  xonotic-0.8.0-source.zip
67b56ab2676cbc76c015fc889d7c23e3  xonotic-moncontrol.patch"
sha256sums="0ba4e05e845a0672d9c47e0ff06c6194d5eb8b2dda28ef2c90b3f2f615f4c84a  xonotic-0.8.0-source.zip
b745ba7c58f3c18b53464f6142c1c4552bda1c131b796453c633b4a91892040e  xonotic-moncontrol.patch"
sha512sums="9d150fce57aa567e5b2dec420c727b8867b2df38651743261533dd0654a59aa7830a441d672b2c605a2ce4869171a4728ee0b035a2da95bef870f9c084e64620  xonotic-0.8.0-source.zip
d74a1d1421dc68dbf46595510cea463382e69c8421110cd7b187419530dbfe9d262d9b65843b89b49aa91d9e32041e11941e411fe52f2dcb0ede18311ab821ec  xonotic-moncontrol.patch"