blob: 95cd885908b81ae24cecea90b677c7883a69c4f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=openrct2
pkgver=0.2.4
_pkgver_objects=1.0.12
_pkgver_title_sequences=0.1.2
pkgrel=2
pkgdesc="Open-source re-implementation of Roller Coaster Tycoon 2"
arch="all !s390x" # Build fails on s390x
url="https://openrct2.io"
license="GPL-3.0-only"
depends="$pkgname-data"
makedepends="cmake ninja jansson-dev libzip-dev libpng-dev speexdsp-dev fontconfig-dev curl-dev icu-dev sdl2-dev mesa-dev fts-dev unzip"
install="$pkgname.post-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/openrct2/openrct2/archive/v$pkgver.tar.gz
$pkgname-$pkgver-title_sequences.zip::https://github.com/OpenRCT2/title-sequences/releases/download/v$_pkgver_title_sequences/title-sequence-v$_pkgver_title_sequences.zip
$pkgname-$pkgver-objects.zip::https://github.com/OpenRCT2/objects/releases/download/v$_pkgver_objects/objects.zip"
subpackages="$pkgname-static $pkgname-doc $pkgname-cli $pkgname-data::noarch"
options="!check" # No tests available
builddir="$srcdir/OpenRCT2-$pkgver"
prepare() {
default_prepare
mkdir "$builddir"/build
mkdir "$builddir"/title && cd "$builddir"/title && unzip "$srcdir"/$pkgname-$pkgver-title_sequences.zip
mkdir "$builddir"/object && cd "$builddir"/object && unzip "$srcdir"/$pkgname-$pkgver-objects.zip
}
build() {
cd "$builddir"/build
cmake -G Ninja "$builddir" \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_TESTS=ON \
-DDOWNLOAD_TITLE_SEQUENCES=OFF \
-DDOWNLOAD_OBJECTS=OFF
ninja
}
package() {
cd "$builddir"/build
DESTDIR="$pkgdir" ninja install
install -d "$pkgdir"/usr/share/openrct2/title
install -d "$pkgdir"/usr/share/openrct2/object
mv "$builddir"/title/* "$pkgdir"/usr/share/openrct2/title
mv "$builddir"/object/* "$pkgdir"/usr/share/openrct2/object
}
data() {
mkdir -p "$subpkgdir"/usr/share/openrct2
mv \
"$pkgdir"/usr/share/openrct2/object \
"$pkgdir"/usr/share/openrct2/g2.dat \
"$pkgdir"/usr/share/openrct2/shaders \
"$pkgdir"/usr/share/openrct2/language \
"$subpkgdir"/usr/share/openrct2
}
cli() {
depends="openrct2-data"
install="$subpkgname.post-install"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/openrct2-cli "$subpkgdir"/usr/bin/openrct2-cli
}
sha512sums="956044b5fa5e55256a33f352d2d1e8a4eb6738b98dc9894807b3628b5c5c08f3229c952fbf8b33ad867771f88c6d7e17ad1a8a4e050f8f269a6152d013afce03 openrct2-0.2.4.tar.gz
7592c5397ceb27347c127ae5c4f8e11d7ef2ff23c97f627b354f941894420f546ffdcff88e2348e42c82d182ccf620e739c745d894a9b5650a0d7d028b68a106 openrct2-0.2.4-title_sequences.zip
d17d2197b66d22e33a246651a0c544a49a6d6a809612d26a851dc4b40bb9e1bf5079bbe5b1a3b7d41f541fc41ce41717d772a5579aa2cdc9ec1dfea72b5a3144 openrct2-0.2.4-objects.zip"
|