summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1faa8af3e868a68866de305d6aa7dfe1bcc70745 (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
# Maintainer: Angelo Theodorou <encelo at users dot sourceforge dot net>
pkgname=stratagus
pkgver=2.4.2
pkgrel=3
pkgdesc="A free cross-platform real-time strategy gaming engine"
arch=('i686' 'x86_64')
url="https://github.com/Wargus/stratagus"
license=('GPL')
depends=('libgl' 'sdl' 'libpng' 'libmng' 'libtheora' 'libmikmod' 'sqlite' 'tolua++')
makedepends=('cmake' 'glu')
changelog=stratagus.changelog
source=("stratagus::git://github.com/Wargus/stratagus.git#tag=v2.4.2" glext.patch)
md5sums=('SKIP' '1c4a52e50e0e959c5b8b58bf42930be7')

prepare() {
  cd $pkgname
  patch --forward --strip=1 --input="${srcdir}/glext.patch"
}


build() {
  cd $srcdir

  cmake ${pkgname} \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DGAMEDIR=/usr/bin \
  -DSBINDIR=/usr/bin \
  -DLUA_INCLUDE_DIR=/usr/include/lua5.1 \
  -Bbuild

  make -C build
}

package() {
  cd ${srcdir}/build
  make DESTDIR=${pkgdir} install

  mkdir -p ${pkgdir}/usr/include
  cp ${srcdir}/stratagus/gameheaders/stratagus-game-launcher.h ${pkgdir}/usr/include
  cp ${srcdir}/stratagus/gameheaders/stratagus-gameutils.h ${pkgdir}/usr/include
  cp ${srcdir}/stratagus/gameheaders/stratagus-tinyfiledialogs.h ${pkgdir}/usr/include
}