summaryrefslogtreecommitdiff
path: root/community/hedgewars/PKGBUILD
blob: 83cf0c31664ee7c00db8dea1a6f26dcc533cdc30 (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
# $Id: PKGBUILD 116000 2014-07-19 16:05:32Z td123 $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=hedgewars
pkgver=0.9.20.5
pkgrel=3
pkgdesc="turn based strategy, artillery, action and comedy game, featuring the
 antics of pink hedgehogs with attitude as they battle from the depths of hell
 to the depths of space."
arch=('i686' 'x86_64')
url="http://hedgewars.org"
license=('GPL' 'custom')
depends=('qt4' 'sdl' 'sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'lua51' 'ffmpeg' 'glut')
makedepends=('fpc' 'cmake'
	     # haskell specific
	     'ghc'
	     'haskell-network'
	     'haskell-bytestring-show'
	     'haskell-utf8-string'
	     'haskell-dataenc'
	     'haskell-hslogger'
	     'haskell-vector'
	     'haskell-random')
source=(http://download.gna.org/hedgewars/hedgewars-src-$pkgver.tar.bz2
        hedgewars.png
        'fix-ghc-7.8-build-failure.diff')
md5sums=('c61eb01466e86da656e1e74ad70a3217'
         'eeb14d50df39063549ac5eca9dbc65d1'
         '84a85365cbbf7a1aabe4d0f37bd5f03f')

prepare() {
  cd $pkgname-src-*
  patch -Np1 -i ${srcdir}/fix-ghc-7.8-build-failure.diff
  sed -i 's|\[ ! -a Hedgewars.app \]|\\[ ! -a Hedgewars.app \\]|' tools/CMakeLists.txt
}

build() {
  cd $pkgname-src-*
  mkdir -p $srcdir/bin
  ln -sf /usr/bin/lrelease-qt4 $srcdir/bin/Qt4::lrelease
  export PATH=$srcdir/bin:$PATH
  cmake \
	-DCMAKE_BUILD_TYPE="Release" \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DDATA_INSTALL_DIR=/usr/share/hedgewars \
	-DNOSERVER=0 .
  make
}

package() {
  cd $pkgname-src-*
  make DESTDIR=$pkgdir install
  install -D -m644 Fonts_LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/Fonts_LICENSE.txt
  install -D -m644 $srcdir/hedgewars.png $pkgdir/usr/share/pixmaps/hedgewars.png
  install -D -m644 share/hedgewars/Data/misc/hedgewars.desktop $pkgdir/usr/share/applications/hedgewars.desktop
}