summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWorMzy Tykashi2020-10-03 23:32:06 +0100
committerWorMzy Tykashi2020-10-03 23:33:11 +0100
commitfe8dee8e4462657337decf51da7efe260343b121 (patch)
tree5dc51308db102ccd7fd743857b40acd7c5eb71b4
parent837f182a2584e90ceede88d6b7035856fc4d6566 (diff)
downloadaur-fe8dee8e4462657337decf51da7efe260343b121.tar.gz
Upadted to 0.2.0. Switch to source build
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD51
-rw-r--r--arcane_fortune25
3 files changed, 79 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aee871aac7fa..3b6e1e45940e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,31 @@
pkgbase = arcanefortune
pkgdesc = A game of empire building, diplomacy, conquest, construction, and deconstruction
- pkgver = 0.1.0
+ pkgver = 0.2.0
pkgrel = 1
url = https://arcanefortune.com
install = arcanefortune.install
arch = x86_64
- license = CC BY-NC-SA 4.0
- options = !strip
- options = !emptydirs
- source = https://arcanefortune.com/releases/arcane_fortune_v0_1_0_linux.zip
+ license = AGPL3
+ license = CC BY-SA 4.0
+ makedepends = git
+ makedepends = rust
+ makedepends = musl
+ depends = sh
+ depends = sdl2
+ depends = sdl2_image
+ depends = sdl2_ttf
+ depends = ncurses
+ depends = freetype2
+ depends = gcc-libs
+ depends = libjpeg6-turbo
+ depends = libtiff
+ depends = zlib
+ source = arcanefortune::git+https://github.com/cody2007/arcane_fortune.git#commit=c5f440473999a4012db9c5ea71989c0db6f734c8
+ source = https://arcanefortune.com/releases/arcane_fortune_v0_2_0_linux.zip
source = arcane_fortune
- sha512sums = ca81299acceb6a4fb4744dd7618f852ca02b12db6b1bccc6c62cd75bcbb50ac5ec89349bd06d8763596148adac69c02cf87cbd549e3cba74bab7304b9513198e
- sha512sums = 52fab1757d298fe1d78596ad7965a618c1bebca2094be377e33cd10c5aa66a37ed6eb9bb3ea1a36f204946656e1ac5b4eab3c993b6a30e9a90f91d3661090d5a
+ sha512sums = SKIP
+ sha512sums = 639ca6e102af94281f9ee5fe3588ca7954b773fc41ca5a4d05db5abd4d72943d9380698ed3cc9313f05677016e2cf595d7f09c089bfb9172fec95de18f08c68b
+ sha512sums = d02f70b65490c70c1cbe0f240289f2942186df3ca0058066507f1b9930e56a74f87c9e78f0bad78d81eba013dae39bf5fc636a6c5abec3fa6d357876eec14602
pkgname = arcanefortune
diff --git a/PKGBUILD b/PKGBUILD
index ba50ef419ce8..6266e5759721 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,23 +2,56 @@
# PKGBUILD/install/wrapper all shamelessly ripped off from [community]/dwarffortress
pkgname=arcanefortune
-pkgver=0.1.0
+pkgver=0.2.0
+_commit=c5f440473999a4012db9c5ea71989c0db6f734c8
pkgrel=1
pkgdesc="A game of empire building, diplomacy, conquest, construction, and deconstruction"
arch=('x86_64')
url="https://arcanefortune.com"
-license=('CC BY-NC-SA 4.0')
-options=(!strip !emptydirs)
+license=('AGPL3' 'CC BY-SA 4.0')
+depends=('sh' 'sdl2' 'sdl2_image' 'sdl2_ttf' 'ncurses' 'freetype2' 'gcc-libs' 'libjpeg6-turbo' 'libtiff' 'zlib')
+makedepends=('git' 'rust' 'musl')
install=arcanefortune.install
-source=("${url}/releases/arcane_fortune_v${pkgver//./_}_linux.zip"
+source=(${pkgname}::git+"https://github.com/cody2007/arcane_fortune.git#commit=${_commit}"
+ "${url}/releases/arcane_fortune_v${pkgver//./_}_linux.zip"
arcane_fortune)
-sha512sums=('ca81299acceb6a4fb4744dd7618f852ca02b12db6b1bccc6c62cd75bcbb50ac5ec89349bd06d8763596148adac69c02cf87cbd549e3cba74bab7304b9513198e'
- '52fab1757d298fe1d78596ad7965a618c1bebca2094be377e33cd10c5aa66a37ed6eb9bb3ea1a36f204946656e1ac5b4eab3c993b6a30e9a90f91d3661090d5a')
+sha512sums=('SKIP'
+ '639ca6e102af94281f9ee5fe3588ca7954b773fc41ca5a4d05db5abd4d72943d9380698ed3cc9313f05677016e2cf595d7f09c089bfb9172fec95de18f08c68b'
+ 'd02f70b65490c70c1cbe0f240289f2942186df3ca0058066507f1b9930e56a74f87c9e78f0bad78d81eba013dae39bf5fc636a6c5abec3fa6d357876eec14602')
+
+build() {
+ cd arcanefortune/arcane_fortune
+
+ # build ncurses binary
+ cargo build --release --locked
+ # rename built binary
+ mv target/release/arcane_fortune target/release/arcane_fortune_ncurses
+ # build sdl binary
+ cargo build --release --features sdl --locked
+}
package() {
- install -dm755 "${pkgdir}/opt"
+ _destdir="${pkgdir}/opt/${pkgname}"
+ # create directory tree
+ install -Ddm755 "${_destdir}/game"
+ # install helper script
install -Dm755 arcane_fortune "${pkgdir}/usr/bin/arcane_fortune"
- cp -r "${srcdir}/arcane_fortune_v${pkgver//./_}_linux" "${pkgdir}/opt/arcanefortune"
- install -Dm644 "${srcdir}/arcane_fortune_v${pkgver//./_}_linux/readme.txt" "${pkgdir}/usr/share/licenses/${pkgname}/readme.txt"
+ # install binaries (using same naming convention as upstream precompiled binaries for compatibility)
+ install -Dm755 ${pkgname}/arcane_fortune/target/release/arcane_fortune_ncurses "${_destdir}/game/arcane_fortune_linux_ncurses"
+ install -Dm755 ${pkgname}/arcane_fortune/target/release/arcane_fortune "${_destdir}/game/arcane_fortune_linux"
+
+ # copy config dir
+ cp -r arcanefortune/arcane_fortune/src/config "${_destdir}/game/config"
+
+ # copy fonts dir
+ cp -r arcanefortune/arcane_fortune/src/fonts "${_destdir}/game/fonts"
+
+ # install icon
+ install -Dm644 arcanefortune/arcane_fortune/src/icon.ico "${_destdir}/game/icon.ico"
+
+ # copy neural net weights
+ cp -r "arcane_fortune_v${pkgver//./_}/game/nn" "${_destdir}/game/nn"
+
+ install -Dm644 "arcanefortune/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}
diff --git a/arcane_fortune b/arcane_fortune
index 82027aa6a8cf..7529d56454ef 100644
--- a/arcane_fortune
+++ b/arcane_fortune
@@ -1,15 +1,22 @@
#!/bin/sh
+# Running this script with --ncurses will start the game in the current terminal.
-# Game has limited knowledge of terms, "xterm", "xterm-256color" and "linux" should be safe
-#export TERM=linux
pkgname=arcanefortune
-if [[ ! -d "${HOME}/.${pkgname}" ]]; then
- mkdir -p "${HOME}/.${pkgname}/saves"
- ln -s /opt/"${pkgname}"/nn "${HOME}/.${pkgname}/nn"
- ln -s /opt/"${pkgname}"/arcane_fortune "${HOME}/.${pkgname}/arcane_fortune"
- cp -rn /opt/"${pkgname}"/config "${HOME}/.${pkgname}/config"
+if [ ! -d "${HOME}/.${pkgname}" ]; then
+ mkdir -p "${HOME}/.${pkgname}/game"
+ mkdir -p "${HOME}/.${pkgname}/game/saves"
+ for f in nn arcane_fortune_linux arcane_fortune_linux_ncurses icon.ico; do
+ ln -s "/opt/${pkgname}/game/$f" "${HOME}/.${pkgname}/game/$f"
+ done
+ cp -rn "/opt/${pkgname}/game/fonts" "${HOME}/.${pkgname}/game/fonts"
+ cp -rn "/opt/${pkgname}/game/config" "${HOME}/.${pkgname}/game/config"
fi
-cd "${HOME}/.${pkgname}"
-exec ./arcane_fortune "${@}"
+cd "${HOME}/.${pkgname}/game"
+if [ "$1" = "--ncurses" ]; then
+ shift
+ exec ./arcane_fortune_linux_ncurses "${@}"
+else
+ exec ./arcane_fortune_linux "${@}"
+fi