# Maintainer: Laurent Carlier # Maintainer: Alexander F. Rødseth # Contributor: Vesa Kaihlavirta pkgname=openttd pkgver=12.0 pkgrel=1 pkgdesc='Engine for running Transport Tycoon Deluxe' arch=(x86_64) url='https://www.openttd.org' license=(GPL) depends=(fluidsynth fontconfig hicolor-icon-theme libpng) 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" "0001-change-network-server.patch") b2sums=('12ffd0978e1f735f4a1d9eb63876a6f4a38867f11e5cbfbb7386f34564ef8b79f394b782c99f28e8a65196b7311aee28427d0485abd2e16dd69f36beb40fa3b1' '43e8f5dfdf2479caceb3a8e84cd38033404b6f09f5a0040b6b208c9cd22f058b6426a02b15b8be722643f49091c8bb60f2f11497b871b4bf90ea7d2d1ac7ea59') prepare() { sed -i '/sse/d;/SSE/d' $pkgname-$pkgver/CMakeLists.txt cd ${pkgname}-${pkgver} patch -p1 -i ../0001-change-network-server.patch } build() { cmake \ -B build \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_INSTALL_BINDIR=bin \ -D CMAKE_INSTALL_DATADIR=/usr/share \ -G Ninja \ -S $pkgname-$pkgver ninja -C build cd build } package() { DESTDIR="$pkgdir" ninja -C build install }