50 lines
1.8 KiB
Bash
50 lines
1.8 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
|
|
# Contributor: 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
|
|
# NOTE: Odd minor versions are unstable! Do not package those.
|
|
pkgver=1.18.2
|
|
epoch=1
|
|
pkgrel=1
|
|
pkgdesc="A turn-based strategy game on a fantasy world"
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
license=('GPL')
|
|
url="https://www.wesnoth.org/"
|
|
depends=('sdl2_mixer' 'sdl2_image' 'boost-libs' 'pango' 'dbus' 'lua')
|
|
makedepends=('boost' 'cmake' 'git' 'ninja' 'python')
|
|
options=(!emptydirs)
|
|
source=("git+https://github.com/wesnoth/wesnoth.git#tag=${pkgver}")
|
|
sha512sums=('b71f6e80a05838176d876a3ea95a2b98004435cceb71aa902204407bbd9a24928bc1be4fc329748cf982cd3073c08d054b963f28f339451142f17b9ebae19c99')
|
|
|
|
build() {
|
|
cd "$pkgname"
|
|
|
|
cmake \
|
|
-GNinja \
|
|
-Bbuild \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DENABLE_TOOLS=ON \
|
|
-DFIFO_DIR=/run/wesnothd \
|
|
-DENABLE_DISPLAY_REVISION=OFF \
|
|
-DENABLE_SYSTEM_LUA=ON
|
|
ninja -C build
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
|
|
# See https://forums.wesnoth.org/viewtopic.php?t=51038
|
|
echo "Linux repository" > "$pkgdir"/usr/share/wesnoth/data/dist
|
|
|
|
mkdir -p "$pkgdir"/usr/lib/{tmpfiles.d,systemd/system}
|
|
install -Dm644 packaging/systemd/wesnothd.sysusers.conf.in "$pkgdir"/usr/lib/sysusers.d/wesnoth.conf
|
|
sed "s|@FIFO_DIR@|/run/wesnothd|" packaging/systemd/wesnothd.tmpfiles.conf.in > "$pkgdir"/usr/lib/tmpfiles.d/wesnothd.conf
|
|
sed -e "s|@FIFO_DIR@|/run/wesnothd|" -e "s|@BINARY_SUFFIX@||" -e "s|@CMAKE_INSTALL_FULL_BINDIR@|/usr/bin|" packaging/systemd/wesnothd.service.in > "$pkgdir"/usr/lib/systemd/system/wesnothd.service
|
|
}
|