summaryrefslogtreecommitdiff
path: root/extra/wesnoth/PKGBUILD
blob: c3ec48db64c074d1f078c2dd62bfb0f07e216aaa (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
# $Id: PKGBUILD 148958 2012-02-05 11:57:49Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Jacobo Arvelo <unix4all@ya.com>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=wesnoth
pkgver=1.8.6
pkgrel=4
pkgdesc="A turn-based strategy game on a fantasy world"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.wesnoth.org/"
depends=('sdl_ttf' 'sdl_net' 'sdl_mixer' 'sdl_image' 'fribidi' 'boost-libs' 'pango' 'lua' "wesnoth-data=${pkgver}" 'dbus-core' 'python2')
makedepends=('boost')
install=wesnoth.install
options=(!emptydirs)
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
        wesnoth-libpng-1.4.0.patch
        wesnoth-1.8.6-boost-foreach.patch
        wesnoth.tmpfiles.conf)
md5sums=('f1c3179869b01b61e253e74aeb241034'
         '3b0d2edcb45e8ecc8c790f92bdcb0087'
         'dc414ab7e1334941548e9db6db9c2460'
         'b8122f5054e3895c9c054e87460869dc')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -Np1 -i "$srcdir/wesnoth-libpng-1.4.0.patch"
  patch -Np1 -i "$srcdir/wesnoth-1.8.6-boost-foreach.patch"
  ./autogen.sh
  ./configure --prefix=/usr --localstatedir=/var --enable-tools \
      --enable-editor --enable-server --with-fifodir=/run/wesnothd
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install-exec
  install -dm755 "$pkgdir/usr/lib/tmpfiles.d/"
  install -m644 "$srcdir/wesnoth.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/wesnoth.conf"

  sed -i "s|#!/usr/bin/env python|#!/usr/bin/env python2|" "$pkgdir/usr/bin/wesnoth_addon_manager"
  sed -i "s|#!/usr/bin/env python|#!/usr/bin/env python2|" "$pkgdir/usr/bin/wmlindent"
  sed -i "s|#!/usr/bin/env python|#!/usr/bin/env python2|" "$pkgdir/usr/bin/wmlscope"
  sed -i "s|#!/usr/bin/env python|#!/usr/bin/env python2|" "$pkgdir/usr/bin/wmllint"
}