summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ae0f40e9497fa178832c3318beb5e2652b3b931c (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
# Maintainer: Vekhir <vekhir AT yahoo DOT com>

pkgname=hedgewars-server-hg
pkgver=r16017+.e8afb1bf2779+
pkgrel=1
pkgdesc="Turn-based strategy artillery game similiar to Worms (Server component)"
arch=('x86_64')
url="https://hedgewars.org"
license=('GPL' 'custom')
depends=('ghc-libs' 'haskell-entropy' 'haskell-sha' 'haskell-random' 'haskell-regex-tdfa'
         'haskell-sandi' 'haskell-hslogger' 'haskell-network' 'haskell-network-bsd'
         'haskell-utf8-string' 'haskell-vector')
makedepends=('mercurial' 'ghc' 'uusi')
provides=('hedgewars-server')
conflicts=('hedgewars' 'hedgewars-hg')
source=("$pkgname::hg+https://hg.hedgewars.org/hedgewars/")
sha512sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}

prepare() {
  cd "$pkgname"
  cd gameServer
  gen-setup
  uusi --nb checker
}

build() {
    cd "$pkgname"/gameServer

    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
    runhaskell Setup build $MAKEFLAGS
}

package() {
  cd "$pkgname"/gameServer

  runhaskell Setup copy --destdir="$pkgdir"
  install -D -m644 ../COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}