updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / teeworlds-isrv / PKGBUILD
bloba1344b7bbf97e90d18c6babc5e67ab60b15cd189
1 # Contributor: Allan McRae <allan@archlinux.org>
2 # Contributor: Armin 'IsSuE' Praher [issue.at.gmx.dot.at]
3 # Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
4 # Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
6 pkgname=teeworlds-isrv
7 pkgver=0.5.2
8 _bamver=0.2.0
9 pkgrel=3
10 pkgdesc="Teeworlds server with instagib patch"
11 arch=('i686' 'x86_64')
12 url="http://teeworlds.com"
13 license=('custom')
14 depends=('alsa-lib' 'mesa' 'sdl')
15 makedepends=('python2')
16 replaces=('teewars')
17 source=(http://www.teeworlds.com/files/teeworlds-${pkgver}-src.tar.gz
18         http://www.teeworlds.com/files/bam-${_bamver}.tar.gz
19         instagib-2.2.patch
20         fix_datadir_search.patch
21         autoexec.cfg)
22 md5sums=('f605f6df9f1714dcda4cba1d281cc757'
23          'd4efe74591a73c1cec8b34d76ffd1049'
24          '16a0b49d80d397a3ebe36033472cdcf4'
25          '0b593a3771eb9db6d3ceb8d4bbf2af62'
26          '95bb4b14ce1ef5290e56234032100c7a')
28 build() {
29         # Build bam (used to build teewars)
30         # Now it is released separately I should make a separate package...
31         cd ${srcdir}/bam-${_bamver}
32         ./make_unix.sh
34         # Build teeworlds
35         cd ${srcdir}/teeworlds-${pkgver}-src
37         # fix for FS 13118 which will be applied in next release
38         patch -p1 -i ../fix_datadir_search.patch
40         # Apply instagib patch
41         patch -p0 -i ../instagib-2.2.patch || return 1
43         # Use Python 2
44         sed -i 's/python /python2 /' default.bam
46         ../bam-${_bamver}/src/bam server_release
49 package() {
50         mkdir -p ${pkgdir}/usr/share/${pkgname}/data/maps
51         cp -r ${srcdir}/teeworlds-${pkgver}-src/data/maps/* ${pkgdir}/usr/share/${pkgname}/data/maps || return 1
52         cd ${srcdir}/teeworlds-${pkgver}-src
53         # Install data files
54         install -Dm755 ${srcdir}/teeworlds-${pkgver}-src/teeworlds_srv ${pkgdir}/usr/bin/teeworlds_isrv || return 1
55         install -Dm644 ${srcdir}/teeworlds-${pkgver}-src/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt || return 1
56         install -Dm644 ${srcdir}/autoexec.cfg ${pkgdir}/usr/share/${pkgname}/data/autoexec.cfg || return 1