aboutsummaryrefslogtreecommitdiffstats
path: root/community/openrct2
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2020-01-27 18:52:55 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-01-27 21:17:01 +0100
commita7420a343cf9acfc00dd5c37f1f6114bc7a6e0bc (patch)
tree0fe4ad17bf1c55fb90ec824d41ff2955713247ad /community/openrct2
parent6d6b30e4939a79660634b22b2f02df4f480bb88d (diff)
downloadaports-a7420a343cf9acfc00dd5c37f1f6114bc7a6e0bc.tar.bz2
aports-a7420a343cf9acfc00dd5c37f1f6114bc7a6e0bc.tar.xz
community/openrct2: fix -cli subpackage
Following the tips of IntelOrca (upstream dev): the -cli subpackage also requires the object files, so move them to a separate subpackage and make both -cli and main package depend on it
Diffstat (limited to 'community/openrct2')
-rw-r--r--community/openrct2/APKBUILD17
-rw-r--r--community/openrct2/openrct2-cli.post-install15
-rw-r--r--community/openrct2/openrct2.post-install2
3 files changed, 20 insertions, 14 deletions
diff --git a/community/openrct2/APKBUILD b/community/openrct2/APKBUILD
index d468664573..25bbf955dd 100644
--- a/community/openrct2/APKBUILD
+++ b/community/openrct2/APKBUILD
@@ -9,19 +9,20 @@ 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"
+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 && cd "$builddir"/build
+ 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
}
@@ -51,7 +52,19 @@ package() {
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
diff --git a/community/openrct2/openrct2-cli.post-install b/community/openrct2/openrct2-cli.post-install
index 3d0b9e718e..0ded1a0155 100644
--- a/community/openrct2/openrct2-cli.post-install
+++ b/community/openrct2/openrct2-cli.post-install
@@ -1,16 +1,9 @@
#!/bin/sh
cat <<EOF
-For OpenRCT2 to run you must install the assets from a retail copy of
-RollerCoaster Tycoon 2. See the following page for more information on
-installing a retail copy of the game on Linux:
+Although assets of a retail copy of RollerCoaster Tycoon 2 are required
+for the client, this is not the case for the headless server.
- https://github.com/OpenRCT2/OpenRCT2/wiki/Installation-on-Linux,-macOS
-
-If kdialog or zenity is available, OpenRCT2 will prompt you for the location of
-the retail install the first time you start it.
-
-Alternatively, manually set the location of retail install:
-
- openrct2 set-rct2 /path/to/RCT2/
+After installing this package, the server can be launched directly with
+openrct2-cli host <path/to/save file>
EOF
diff --git a/community/openrct2/openrct2.post-install b/community/openrct2/openrct2.post-install
index 3d0b9e718e..8937f23340 100644
--- a/community/openrct2/openrct2.post-install
+++ b/community/openrct2/openrct2.post-install
@@ -5,7 +5,7 @@ For OpenRCT2 to run you must install the assets from a retail copy of
RollerCoaster Tycoon 2. See the following page for more information on
installing a retail copy of the game on Linux:
- https://github.com/OpenRCT2/OpenRCT2/wiki/Installation-on-Linux,-macOS
+ https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files
If kdialog or zenity is available, OpenRCT2 will prompt you for the location of
the retail install the first time you start it.