summaryrefslogtreecommitdiff
path: root/community/teeworlds/PKGBUILD
blob: 4263f59c7f256676212f4c2d19e5001c378db863 (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
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Armin 'IsSuE' Praher [issue.at.gmx.dot.at]
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>

pkgname=teeworlds
pkgver=0.6.1
_bamver=0.4.0
pkgrel=1
pkgdesc="A multiplayer 2D shooter"
arch=('i686' 'x86_64')
url="http://teeworlds.com"
license=('custom')
depends=('alsa-lib' 'mesa' 'sdl' 'freetype2')
makedepends=('python2')
replaces=('teewars')
source=(http://www.teeworlds.com/files/${pkgname}-${pkgver}-source.tar.gz
        https://github.com/downloads/matricks/bam/bam-${_bamver}.tar.bz2
        teeworlds.desktop
		teeworlds.png)
md5sums=('00de7195ecd1f23596dc3237341af512'
         'f8b62ad553c3615a725a034df4fb4257'
         '3944aaf7a8c19a83510b2b39c4cddf5f'
         '44f39e398409232a0e0a431ed46d8cc8')

build() {
	# Build bam (used to build teeworlds)
	# Now it is released separately I should make a separate package...
	cd ${srcdir}/bam-${_bamver}
	./make_unix.sh

	# Build teeworlds
	cd ${srcdir}/${pkgname}-*-source

	# Use Python 2
	sed -i 's/python /python2 /' bam.lua

	../bam-${_bamver}/bam server_release client_release
}

package() {
	cd ${srcdir}/${pkgname}-*-source

	# Install data files
	mkdir -p ${pkgdir}/usr/share/${pkgname}/data
	cp -r data/* ${pkgdir}/usr/share/${pkgname}/data

	install -Dm755 ${pkgname} ${pkgdir}/usr/bin/${pkgname}
	install -Dm755 ${pkgname}_srv ${pkgdir}/usr/bin/${pkgname}_srv

	install -Dm644 ${srcdir}/${pkgname}.desktop \
		${pkgdir}/usr/share/applications/${pkgname}.desktop
	install -Dm644 ${srcdir}/${pkgname}.png \
		${pkgdir}/usr/share/pixmaps/${pkgname}.png

	install -Dm644 license.txt \
		${pkgdir}/usr/share/licenses/${pkgname}/license.txt
}