summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Minnocci2021-11-12 00:34:50 +0100
committerFrancesco Minnocci2021-11-12 00:34:50 +0100
commit52ae880a276a01b289944c304aac5f7788aeb825 (patch)
tree3bdcce0becf8185af7a667f90d3f2855ecc683dd
parentf1e69fbd0ab4ca96fd0099a60a966a4e0021aff1 (diff)
downloadaur-52ae880a276a01b289944c304aac5f7788aeb825.tar.gz
Switch to Cmake to follow upstream, use xdg-compliant data folder.
-rw-r--r--PKGBUILD29
-rw-r--r--fabother-world.desktop2
-rw-r--r--fabother-world.install3
-rw-r--r--fabother-world.sh6
4 files changed, 18 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 58ee07c090d4..a978649f0d70 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,35 @@
-# Maintainer: carstene1ns <url/mail: arch carsten-teibes de>
+# Maintainer: Francesco Minnocci <ascoli dot minnocci at gmail dot com>
+# Contributor: carstene1ns <url/mail: arch carsten-teibes de>
_pkgbase=fabother-world
pkgname=$_pkgbase-git
-pkgver=r62.0b0f404
+pkgver=r84.dea6914
pkgrel=1
pkgdesc='An interpreter for Another World (Out of this world)'
arch=('i686' 'x86_64')
url="http://fabiensanglard.net/anotherWorld_code_review/"
license=('GPL2')
depends=('sh' 'sdl' 'zlib')
-makedepends=('git')
+makedepends=('git' 'cmake')
conflicts=("$_pkgbase")
provides=("$_pkgbase")
install=$_pkgbase.install
source=($_pkgbase::"git+https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter.git"
"$_pkgbase.sh" "$_pkgbase.png" "$_pkgbase.desktop")
sha256sums=('SKIP'
- 'edc27018901b0d72fdeae797643070dbfa53dc2220d9f96af059b1aff4430aa9'
+ 'ef2791fdc1c9c6ad4ae4defaf62f9b0f59711c67c23078d50697a116eede71f5'
'b57c493f1ae135ebc2b809211db091957fa0a7b755856ef1637e58cdd7dd216e'
- '897a8ae9f3bf64e44dea5981b0d1189ea80e4aedf0b4ab039b7e969c7eb7593f')
+ '5a28c3275fc006e802817caab6bab0b10da6c95422213f6aed0185a01d792a3a')
pkgver() {
cd $_pkgbase
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-prepare() {
- # add our cxxflags
- sed "s|CXXFLAGS.*DEFINES)$|& ${CXXFLAGS}|" -i $_pkgbase/Makefile
-}
-
build() {
- make -C $_pkgbase
+ cd $_pkgbase
+ cmake .
+ make
}
package() {
@@ -39,11 +37,10 @@ package() {
# launcher + binary
install -Dm755 ../$_pkgbase.sh "$pkgdir"/usr/bin/$_pkgbase
- install -Dm755 game "$pkgdir"/usr/share/$_pkgbase/$_pkgbase
- # doc
- install -Dm644 README "$pkgdir"/usr/share/doc/$_pkgbase/README
- install -m644 README.newraw "$pkgdir"/usr/share/doc/$_pkgbase
- tail -n 210 main.cpp > "$pkgdir"/usr/share/doc/$_pkgbase/implementation.txt
+ install -Dm755 raw "$pkgdir"/usr/share/$_pkgbase/$_pkgbase
+ # docs
+ install -Dm644 README.md "$pkgdir"/usr/share/doc/$_pkgbase/README.md
+ tail -n 200 src/main.cpp > "$pkgdir"/usr/share/doc/$_pkgbase/implementation.txt
# desktop entry
install -Dm644 ../$_pkgbase.png "$pkgdir"/usr/share/pixmaps/$_pkgbase.png
install -Dm644 ../$_pkgbase.desktop "$pkgdir"/usr/share/applications/$_pkgbase.desktop
diff --git a/fabother-world.desktop b/fabother-world.desktop
index 5f0e95a227b1..2c0570fe9059 100644
--- a/fabother-world.desktop
+++ b/fabother-world.desktop
@@ -4,5 +4,5 @@ Name=Fabother World
Comment=Another World (Out Of This World) interpreter
Exec=fabother-world
Icon=fabother-world
-Terminal=false
Categories=Game;
+Terminal=false
diff --git a/fabother-world.install b/fabother-world.install
index a59b5de3ca3e..39ae42877d66 100644
--- a/fabother-world.install
+++ b/fabother-world.install
@@ -1,7 +1,6 @@
-
post_install() {
echo "You need the original 'Another World'/'Out of this World' data files to play."
- echo "It searches for 'BANK*' and 'MEMLIST.BIN' in '~/.fabother-world/data'."
+ echo "It searches for the 'BANK*' and 'MEMLIST.BIN' files in '~/.config/fabother-world/data' (according to your $XDG_CONFIG_HOME)."
}
post_upgrade() {
diff --git a/fabother-world.sh b/fabother-world.sh
index df5e46a0fd86..e461a0b7d531 100644
--- a/fabother-world.sh
+++ b/fabother-world.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-mkdir -p ~/.fabother-world/data
+mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}"/fabother-world/data
exec /usr/share/fabother-world/fabother-world \
- --datapath=$HOME/.fabother-world/data \
- --savepath=$HOME/.fabother-world "$@"
+ --datapath="${XDG_CONFIG_HOME:-$HOME/.config}"/fabother-world/data \
+ --savepath="${XDG_CONFIG_HOME:-$HOME/.config}"/fabother-world "$@"