PKGBUILD 1.58 KB
Newer Older
1
pkgname=wesnoth
Jeff Huang's avatar
Jeff Huang committed
2
pkgver=1.12.6
3
pkgrel=3
4
pkgdesc="A turn-based strategy game on a fantasy world."
Jeff Huang's avatar
Jeff Huang committed
5
arch=('x86_64')
6
license=('GPL2')
7
url="http://www.wesnoth.org/"
8
depends=('boost-libs' 'freetype2' 'fribidi' 'gcc-libs' 'icu' 'libvorbis' 'lua' 'pango' 'sdl_image' 'sdl_mixer' 
Jeff Huang's avatar
Jeff Huang committed
9
'sdl_net' 'sdl_ttf' 'dbus' 'python2')
10
makedepends=('boost' 'cmake')
11
conflicts=('wesnoth-dev' 'wesnoth-svn')
Giuseppe's avatar
Giuseppe committed
12
categories=('games')
Jeff Huang's avatar
Jeff Huang committed
13
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2
Jeff Huang's avatar
Jeff Huang committed
14 15 16
        "wesnoth-boost.patch"
        "wesnothd.tmpfiles.conf"
        "wesnothd.service")
Jeff Huang's avatar
Jeff Huang committed
17
sha256sums=('a50f384cead15f68f31cfa1a311e76a12098428702cb674d3521eb169eb92e4e'
Jeff Huang's avatar
Jeff Huang committed
18 19 20
            'ccacb1049a71935392b46f919c4045b11936b232522ed2763561fbc0fb1e40b7'
            '1ae908f0608e9600088d3175c2276923e7fdccf825850d3f6e607bc197987e70'
            'd314dbefc72d09f2e3b1db15c4dc20873771f26df2360b39b55481deaeba00db')
21 22

build() {
Jeff Huang's avatar
Jeff Huang committed
23 24 25 26
  cd ${srcdir}/${pkgname}-${pkgver}
  
  # Try this again in a new version when they fix their linking to boost
  patch -Np1 < ${srcdir}/wesnoth-boost.patch
27

28
  mkdir -p build && cd build
29 30
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
31 32 33 34
    -DENABLE_CAMPAIGN_SERVER=ON \
    -DENABLE_TOOLS=ON \
    -DENABLE_OMP=ON \
    -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
35 36
    -DMANDIR=share/man \
    -DFIFO_DIR=/run/wesnothd \
37 38
    ..
  make
39
}
40

41
package() {
Jeff Huang's avatar
Jeff Huang committed
42
  cd ${srcdir}/${pkgname}-${pkgver}/build
43
  make DESTDIR=$pkgdir install
Jeff Huang's avatar
Jeff Huang committed
44 45 46
  
  install -Dm644 "$srcdir/wesnothd.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/wesnothd.conf"
  install -Dm644 "$srcdir/wesnothd.service" "$pkgdir/usr/lib/systemd/system/wesnothd.service"
47
}