git » openttd.git » main » tree

[main] / PKGBUILD

# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>

pkgname=openttd
pkgver=15.0_beta1
_pkgver=${pkgver//_/-}
pkgrel=1
pkgdesc='Engine for running Transport Tycoon Deluxe'
arch=(x86_64 'armv7h')
url='https://www.openttd.org'
license=(GPL)
depends=(fluidsynth fontconfig hicolor-icon-theme)
makedepends=(cmake ninja)
optdepends=('openttd-opengfx: free graphics'
            'openttd-opensfx: free soundset')
source=("https://cdn.$pkgname.org/$pkgname-releases/$_pkgver/$pkgname-$_pkgver-source.tar.xz")

prepare() {
  sed -i '/sse/d;/SSE/d' $pkgname-$_pkgver/CMakeLists.txt
}

build() {
  cmake \
    -B build \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_INSTALL_BINDIR=bin \
    -D CMAKE_INSTALL_DATADIR=/usr/share \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -G Ninja \
    -S $pkgname-$_pkgver
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
}
sha256sums=('dccf62908094cef8911eb494b27bc76cce558d8d975056775e62b9a05cc79867')