summarylogtreecommitdiffstats
diff options
context:
space:
mode:
author0x715C2019-03-16 18:54:48 +1100
committer0x715C2019-03-16 18:54:48 +1100
commitcaca1cf4ca29eab90b7bd8ac8feda183b7324670 (patch)
tree3a99c5585efc2160c29e82e2bf07f22a51939d15
downloadaur-caca1cf4ca29eab90b7bd8ac8feda183b7324670.tar.gz
Init
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD77
-rw-r--r--atomrpg.desktop8
3 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..09c9d252563
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = atomrpg
+ pkgdesc = Post-apocalyptic indie game
+ pkgver = 1.073.26991
+ pkgrel = 1
+ url = https://atomrpg.com/
+ arch = i686
+ arch = x86_64
+ license = custom:None
+ depends = libgl
+ depends = libx11
+ depends = glu
+ depends = desktop-file-utils
+ depends = gtk-update-icon-cache
+ noextract = atom_rpg_post_apocalyptic_indie_game_1_073_26991.sh
+ source = gog://atom_rpg_post_apocalyptic_indie_game_1_073_26991.sh
+ source = atomrpg.desktop
+ sha256sums = 350bb3877a5a7959e8f0f3a39e49aa616c5adf548f5037de73a92e49f1715b50
+ sha256sums = 41ac5904f3c913a112d420960aaca0fd4967ac23274eb5161a74e9d967c0349d
+
+pkgname = atomrpg
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c05da7a20e6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: 0x715C <https://www.t.me/hex715C>
+
+pkgname=atomrpg
+_pkgname=atom_rpg_post_apocalyptic_indie_game
+pkgver=1.073.26991
+pkgrel=1
+pkgdesc='Post-apocalyptic indie game'
+url="https://${pkgname}.com/"
+license=('custom:None')
+arch=('i686' 'x86_64')
+depends=('libgl' 'libx11' 'glu' 'desktop-file-utils' 'gtk-update-icon-cache')
+makedepnds=('imagemagick' 'zip' 'unzip')
+noextract=("${_pkgname}_${pkgver//./_}.sh")
+source=("gog://${_pkgname}_${pkgver//./_}.sh"
+"${pkgname}.desktop")
+sha256sums=('350bb3877a5a7959e8f0f3a39e49aa616c5adf548f5037de73a92e49f1715b50'
+ '41ac5904f3c913a112d420960aaca0fd4967ac23274eb5161a74e9d967c0349d')
+
+# You need to download the gog.com installer file manually or with lgogdownloader.
+DLAGENTS+=("gog::/usr/bin/echo %u - This is is not a real URL, you need to download the GOG file manually to \"$PWD\" or setup a gog:// DLAGENT. Read this PKGBUILD for more information.")
+
+# Prevent compressing final package
+PKGEXT='.pkg.tar'
+
+prepare(){
+
+ # Remove non matching architecture code
+ case $CARCH in
+ i686) _notarch=x86_64 ;;
+ x86_64) _notarch=x86 ;;
+ esac
+ find -name "*$_notarch" -exec rm -r {} +
+
+ # Unzip will produce an error code because it is unable to unzip the Installer.
+ # Therefore, a conditional into a no-op command will keep the PKGBUILD from failing
+ # Of course, if you have any real problems unzipping the PKGBUILD will not abort.
+ echo "Removing setup scripts from ${_pkgname}_${pkgver//./_}.sh"
+ zip -Fq "${_pkgname}_${pkgver//./_}.sh" --output "${pkgname}-${pkgver}.zip"
+ echo "Extracting game data"
+ unzip -q "${pkgname}-${pkgver}.zip"
+ echo "Data extracted"
+
+ cd "${srcdir}"
+ echo $PWD
+
+ cd "${srcdir}/data/noarch"
+ sed -r -i \
+ 's/(CURRENT_DIR="\$\( cd "\$\( dirname )'`
+ `'"\$\{BASH_SOURCE\[0\]\}"(.*$)'`
+ `'/\1$( readlink -nf "${BASH_SOURCE[0]}" )\2/' \
+ "start.sh"
+}
+
+package(){
+ cd "${srcdir}/data/noarch"
+ destdir="$pkgdir/opt/$pkgname"
+ install -dm 755 "$destdir"
+
+ # Install game
+ install -d "${pkgdir}/opt/${pkgname}/"
+ install -d "${pkgdir}/opt/${pkgname}/support"
+ install -d "${pkgdir}/usr/bin/"
+ cp -r "game/" "${pkgdir}/opt/${pkgname}/"
+ install -Dm755 "start.sh" "gameinfo" "${pkgdir}/opt/${pkgname}/"
+ install -Dm755 support/*.{sh,shlib} "${pkgdir}/opt/${pkgname}/support"
+
+ # Desktop integration
+ install -Dm 644 "support/icon.png" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -Dm644 "docs/End User License Agreement.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ ln -s "/opt/${pkgname}/start.sh" "${pkgdir}/usr/bin/${pkgname}"
+
+ install -dm 755 "$pkgdir/usr/{bin,share/{applications,icons/hicolor/{scalable,256x256,64x64}/apps}}" "$destdir"
+}
diff --git a/atomrpg.desktop b/atomrpg.desktop
new file mode 100644
index 00000000000..472a524c850
--- /dev/null
+++ b/atomrpg.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=Atom RPG
+Exec=atomrpg
+Icon=atomrpg
+Type=Application
+Categories=Game;StrategyGame;