pkgbuilds/openttd/PKGBUILD

43 lines
1.3 KiB
Text
Raw Normal View History

2021-08-06 09:51:48 +08:00
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
2020-06-11 18:16:13 +08:00
pkgname=openttd
2021-08-06 09:51:48 +08:00
pkgver=1.11.2
pkgrel=5
pkgdesc='Engine for running Transport Tycoon Deluxe'
arch=(x86_64)
2020-06-11 18:16:13 +08:00
url='https://www.openttd.org'
2021-08-06 09:51:48 +08:00
license=(GPL)
depends=(fluidsynth fontconfig hicolor-icon-theme libpng)
makedepends=(cmake ninja)
optdepends=('openttd-opengfx: free graphics'
2020-06-11 18:16:13 +08:00
'openttd-opensfx: free soundset')
2021-08-06 09:51:48 +08:00
source=("https://proxy.binaries.openttd.org/openttd-releases/$pkgver/$pkgname-$pkgver-source.tar.xz"
2020-06-11 18:16:13 +08:00
"0001-change-network-server.patch")
2021-08-06 09:51:48 +08:00
b2sums=('c71fd98a480566aede29f84afbd100b6d0dfa80311860907a7287d2d5bed74bd492c2b1012cd83f45fe68d60fb0c2378e1384530a84c28bd7fbd907b45110491'
'0f704bfbec2b37accaf13d139fc1e9e8dc30c03f3530bfa43b05dcd125c0f4c61c0747372fa80f85dee896fff1c69dbeab6c0e5bd780f196c6b512221eae327c')
2020-06-11 18:16:13 +08:00
prepare() {
2021-08-06 09:51:48 +08:00
sed -i '/sse/d;/SSE/d' $pkgname-$pkgver/CMakeLists.txt
2020-06-11 18:16:13 +08:00
cd ${pkgname}-${pkgver}
patch -p1 -i ../0001-change-network-server.patch
}
build() {
2021-08-06 09:51:48 +08:00
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
2020-06-11 18:16:13 +08:00
}
package() {
2021-08-06 09:51:48 +08:00
DESTDIR="$pkgdir" ninja -C build install
2020-06-11 18:16:13 +08:00
}