summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Ryan2019-05-15 02:26:38 -0500
committerJoseph Ryan2019-05-15 02:26:38 -0500
commit9890f3cfa5a4e04177fa290b6c17b1b1e6545fde (patch)
tree92022136699287bc1324d069e9806bb0fa22a6ed
downloadaur-9890f3cfa5a4e04177fa290b6c17b1b1e6545fde.tar.gz
Package eggnogg from itch.io
Using eggnogg+'s package as a template
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD39
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a08c19f8870
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = eggnogg
+ pkgdesc = A competitive arcade game of immortals sword-fighting to the death
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://madgarden.itch.io/eggnogg
+ arch = x86_64
+ license = nonfree
+ makedepends = tar
+ makedepends = curl
+ makedepends = gendesk
+ depends = lib32-libglvnd
+ depends = lib32-sdl_mixer
+ source = http://madgarden.net/junkz/madgarden/eggnogg/icon-1.png
+ md5sums = a6eb8862c233b3a85a70ada0f8542edc
+
+pkgname = eggnogg
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..29f15f35de8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Joseph Ryan <josephryan3.14@gmail.com>
+pkgname=eggnogg
+pkgver=1.0
+pkgrel=1
+pkgdesc="A competitive arcade game of immortals sword-fighting to the death"
+arch=('x86_64')
+url="https://madgarden.itch.io/eggnogg"
+license=('nonfree')
+makedepends=('tar' 'curl' 'gendesk')
+depends=('lib32-libglvnd' 'lib32-sdl_mixer')
+source=('http://madgarden.net/junkz/madgarden/eggnogg/icon-1.png')
+md5sums=('a6eb8862c233b3a85a70ada0f8542edc')
+_name='EGGNOGG'
+_categories='Game;ArcadeGame'
+
+prepare() {
+ gendesk -n -f ../PKGBUILD
+}
+
+build() {
+ cd ${srcdir}/
+ game_url=$(curl -s -XPOST "https://madgarden.itch.io/eggnogg/file/908?after_download_lightbox=true" | grep -Po '"url":.*?[^\\]",' | cut -c8- | rev | cut -c3- | rev | sed 's/\\\//\//g')
+ curl -o eggnogg-linux.tar.gz ${game_url}
+ tar xzf eggnogg-linux.tar.gz
+}
+
+package() {
+ cd ${srcdir}/eggnogg-linux
+
+ mkdir -p ${pkgdir}/usr/share/games/${pkgname}
+ mkdir -p ${pkgdir}/usr/bin/
+ mkdir -p ${pkgdir}/usr/share/icons/hicolor/64x64/apps/
+ install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ cp ${srcdir}/icon-1.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/${pkgname}.png
+ cp -a eggnogg data README.txt ${pkgdir}/usr/share/games/${pkgname}/
+ # The game needs to be launched from the data parent directory and it needs write access to this folder
+ echo -e "#!/bin/sh\ncd /usr/share/games/${pkgname}\n./eggnogg" > ${pkgdir}/usr/bin/${pkgname}
+ chmod +x ${pkgdir}/usr/bin/${pkgname}
+}