summaryrefslogtreecommitdiff
path: root/community/teeworlds/PKGBUILD
blob: 61388b1d9375d88c0c60758e042c550091087419 (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
# 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.2
pkgrel=2
pkgdesc='Multiplayer 2D shooter'
arch=('i686' 'x86_64')
url='https://www.teeworlds.com'
license=('custom')
depends=('alsa-lib' 'glu' 'sdl' 'freetype2')
makedepends=('python' 'bam' 'mesa' 'imagemagick' 'gendesk')
source=("https://www.teeworlds.com/files/${pkgname}-${pkgver}-source.tar.gz")
md5sums=('649f6c05a7b117096b238c07062edc39')

prepare() {
  convert "$pkgname-$pkgver-source/other/icons/Teeworlds.ico" "$srcdir/$pkgname.png"
  gendesk -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" \
    --name 'Teeworlds' --categories 'Game;ArcadeGame'
}

build() {
  cd "$pkgname-$pkgver-source"

  bam server_release client_release
}

package() {
  cd "$pkgname-$pkgver-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}-0.png ${pkgdir}/usr/share/pixmaps/${pkgname}.png
  
  install -Dm644 license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt
}

# vim:set ts=2 sw=2 et: