aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xonotic/APKBUILD
blob: 5b832faccc1a75fe3f14772599d2cb10123e7642 (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
71
72
73
74
75
76
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer:
pkgname=xonotic
pkgver=0.7.0
pkgrel=0
pkgdesc="Game engine for Xonotic (quake1/nexuiz derivative)"
url="http://www.xonotic.org/"
arch="all"
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() {
	cd "$_builddir"

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

	msg "building dedicated server"
	make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 sv-release

	msg "building GLX client"
	make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 cl-release

	msg "building SDL client"
	make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 sdl-release
}

package() {
	cd "$_builddir"

	mkdir -p "$pkgdir"/usr/bin
	install -Dm755 source/darkplaces/darkplaces-dedicated "$pkgdir"/usr/bin/xonotic-dedicated
}

sdl() {
	pkgdesc="$pkgdesc (SDL client)"

	cd "$_builddir"

	mkdir -p "$subpkgdir"/usr/bin
	install -Dm755 source/darkplaces/darkplaces-sdl "$subpkgdir"/usr/bin/xonotic-sdl
}

glx() {
	pkgdesc="$pkgdesc (GLX client)"

	cd "$_builddir"

	mkdir -p "$subpkgdir"/usr/bin
	install -Dm755 source/darkplaces/darkplaces-glx "$subpkgdir"/usr/bin/xonotic-glx
}

md5sums="1cc50a79ac6abf27da916bfb5e066043  xonotic-0.7.0-source.zip
e7ad5ace0debe34486ff06b4f78b3f27  xonotic-moncontrol.patch"
sha256sums="f1a527de67ab2bfd2b17414614301a783ad04e00dbd0d8abb516505e4ee9f88c  xonotic-0.7.0-source.zip
5bb342ea261775d7a4cb0c542656aa12df17e27338ef4ed32711c03b36a9f73f  xonotic-moncontrol.patch"
sha512sums="1b22c04e513284a460747bc63cde93ab177b63f90f38ae4b64ada1620c588ca0f521de958255924fd696ca85f928d7e91fc6746b8ada86c9e5385c3d52846492  xonotic-0.7.0-source.zip
0412b191fcdee9835d2fb6f39e030f06cb72f795783ea2a1be32760dd4ef7a643414c3ddad01919f73d746272810a9a91cace19c84fd752417fe641eb08af3f3  xonotic-moncontrol.patch"