summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 186e92f7e66c9fa0b0954b4a4c951a8dbcac7db2 (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
60
# Maintainer: Larry Hajali <larryhaja[at]gmail[dot]com>
# Contributor: carstene1ns <arch carsten-teibes de>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: archtux <antonio.arias99999 at gmail.com>

pkgname=bitfighter
pkgver=0.19e
pkgrel=2
pkgdesc="A fast-paced team-based outer-space multi-player combat game"
arch=('i686' 'x86_64')
url="http://bitfighter.org/"
license=('GPL')
depends=('sdl2' 'libpng' 'libvorbis' 'libmodplug' 'openal' 'speex')
makedepends=('cmake' 'libmariadbclient' 'glu')
install=${pkgname}.install
source=("http://${pkgname}.org/files/${pkgname}-${pkgver/./}.tar.gz"
        "https://$pkgname.googlecode.com/files/classic_level_pack.zip"
        "$pkgname.png"
        "$pkgname.desktop"
        "gcc-5.X.patch")
md5sums=('66ff2a80f4ffd7cd354667e906323759'
         'cb32039b47026e176d3f1f3639bd1a9f'
         '8b28490af9deadd0a1a104ae372f5b08'
         '657e0ff146dd3dac682e15be5a74fbf0'
         '5e908bcd41b746bb45a56c69fb819b04')

prepare() {
  cd ${pkgname}-${pkgver/./}
  patch -p1 < ${srcdir}/gcc-5.X.patch
}

build() {
  cd ${pkgname}-${pkgver/./}/build
  cmake \
    -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
    -DUSE_SDL2:BOOL=YES \
    -DUSE_GLES:BOOL=YES \
    -DCMAKE_BUILD_TYPE=Release \
    ..

  make VERBOSE=1
}

package() {
  cd $pkgname-${pkgver/./}

  # install game ressources and executable
  install -d "$pkgdir"/usr/share/$pkgname "$pkgdir"/usr/bin
  cp "${srcdir}"/classic_level_pack/* resource/levels
  cp -r resource/* exe/*.ini "$pkgdir"/usr/share/$pkgname
  install -m755 exe/$pkgname "$pkgdir"/usr/bin/$pkgname

  # install a desktop entry
  install -Dm644 ../$pkgname.png "$pkgdir"/usr/share/pixmaps/$pkgname.png
  install -Dm644 ../$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop

  # install documentation and license
  install -Dm644 doc/README.txt "$pkgdir"/usr/share/doc/$pkgname/README
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}