summaryrefslogtreecommitdiff
path: root/community/0ad/PKGBUILD
blob: 6325cb3f72ec41bf4ab8cdbea6bcb30df140d85a (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
# $Id: PKGBUILD 96786 2013-09-05 07:34:19Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: t3ddy  <t3ddy1988 "at" gmail {dot} com>
# Contributor: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgname=0ad
pkgver=a14
_pkgver=0.0.14-alpha
pkgrel=1
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
arch=('i686' 'x86_64')
url="http://play0ad.com/"
license=('GPL2' 'CCPL')
depends=('binutils' 'boost-libs' 'curl' 'enet>=1.3' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'openal' 'sdl' 'wxgtk' 'zlib' 'libgl' '0ad-data' 'glu')
makedepends=('boost' 'cmake' 'mesa' 'zip' 'python2')
source=("http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz")
md5sums=('5bbaffa02b6e9082cbd5142d43f9b700')

build() {
  cd "$srcdir/$pkgname-$_pkgver/build/workspaces"

  unset CPPFLAGS # for le spidermonkey

  ./update-workspaces.sh \
      --with-system-enet \
      --bindir=/usr/bin \
      --libdir=/usr/lib/0ad \
      --datadir=/usr/share/${pkgname}/data

  cd "$srcdir/$pkgname-$_pkgver/build/workspaces/gcc"

  make CONFIG=Release
}

package() {
  install -d "${pkgdir}"/usr/{bin,lib/0ad}
  install -Dm755 "${srcdir}"/${pkgname}-${_pkgver}/binaries/system/pyrogenesis "${pkgdir}/usr/bin"
  install -Dm755 "${srcdir}"/${pkgname}-${_pkgver}/binaries/system/*.so{,.1.0} "${pkgdir}/usr/lib/0ad"

  install -Dm755 "${srcdir}/${pkgname}-${_pkgver}/build/resources/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm644 "${srcdir}/$pkgname-$_pkgver/build/resources/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  install -Dm644 "${srcdir}/$pkgname-$_pkgver/build/resources/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}