diff options
author | sikfeng@gmail.com | 2018-10-29 19:10:56 +0800 |
---|---|---|
committer | sikfeng@gmail.com | 2018-10-29 19:10:56 +0800 |
commit | 9c5595d32ac9feaebddb301d0c480c952735bdf6 (patch) | |
tree | de202962d0ebd5720b646745e0f2884abc21ab7f | |
download | aur-9c5595d32ac9feaebddb301d0c480c952735bdf6.tar.gz |
first commit yay
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | gog-xenonauts | 24 | ||||
-rw-r--r-- | gog-xenonauts.desktop | 10 |
4 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..833673ac3fc1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = gog-xenonauts + pkgdesc = Xenonauts - GOG Version + pkgver = 1.65 + pkgrel = 1 + url = https://www.gog.com/game/xenonauts + arch = i686 + arch = x86_64 + groups = games + groups = gog + license = custom + depends = alsa-plugins + depends = alsa-utils + depends = sdl2 + depends = mesa + depends = lib32-libglvnd + depends = lib32-gtk2 + source = gog-xenonauts + source = gog-xenonauts.desktop + sha256sums = 3e76f0b15772d6670adfcd5c8a24de8e1ea8c54f52344e5acae5724e4e502004 + sha256sums = e75c528f260c3e811cc133776a304c077a6285f29e82d2e227312ae96b484ce2 + +pkgname = gog-xenonauts + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4e17a04ca690 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: sikfeng <sikfeng@gmail.com> + +pkgname='gog-xenonauts' +pkgdesc="Xenonauts - GOG Version" +pkgver=1.65 +pkgrel=1 +url='https://www.gog.com/game/xenonauts' +arch=('i686' 'x86_64') +groups=('games' 'gog') +license=('custom') +depends=('alsa-plugins' 'alsa-utils' 'sdl2' 'mesa' 'lib32-libglvnd' 'lib32-gtk2') +PKGEXT=.pkg.tar +source=( + "${pkgname}" + "${pkgname}.desktop" +) +sha256sums=( + '3e76f0b15772d6670adfcd5c8a24de8e1ea8c54f52344e5acae5724e4e502004' + 'e75c528f260c3e811cc133776a304c077a6285f29e82d2e227312ae96b484ce2' +) + +_gamepkg=xenonauts_en_1_65_21328.sh +# The sh file is a mojosetup wrapper around a zip archive. +# Skip the useless bits so we can extract it without errors. +_skipbytes=860556 +build() { + msg "You need a full copy of this game in order to install it" + msg "Searching for ${_gamepkg} in dir: \"$startdir\"" + pkgpath="$startdir" + if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then + error "Game package not found, please type absolute path to ${_gamepkg} (/home/user):" + read pkgpath + if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then + error "Unable to find game package." && return 1 + fi + fi + msg "Found game package, unpacking..." + mkdir "${srcdir}/extract" + tail -c +$_skipbytes "${pkgpath}/${_gamepkg}" > clean.zip + unzip clean.zip -d "${srcdir}/extract" +} + +package() { + install -d "${pkgdir}/opt/${pkgname}" + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -d "${pkgdir}/usr/share/applications" + install -d "${pkgdir}/usr/bin" + + cd "${srcdir}/extract/data/noarch" + mv * "${pkgdir}/opt/${pkgname}/" + install -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -m644 "${pkgdir}/opt/${pkgname}/docs/End User License Agreement.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -m755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin" + + chmod 777 "${pkgdir}"/opt/${pkgname} -R +} diff --git a/gog-xenonauts b/gog-xenonauts new file mode 100644 index 000000000000..e1aff47dd20e --- /dev/null +++ b/gog-xenonauts @@ -0,0 +1,24 @@ +#!/bin/bash + +pkgname='gog-xenonauts' +pkgdir="/opt/${pkgname}/" +run="${pkgdir}/start.sh" + +if hash firejail; then + echo "Firejail detected; attempting to enforce a sandbox..." + if [[ -f "${XDG_CONFIG_HOME}/firejail/${pkgname}.profile" ]]; then + echo "Firejail profile for ${pkgname} found in ${XDG_CONFIG_HOME}/firejail/" + echo "Enforcing a sandbox!" + firejail "${run}" + elif [[ -f "/etc/firejail/${pkgname}.profile" ]]; then + echo "Firejail profile for ${pkgname} found in /etc/firejail/" + echo "Enforcing a sandbox!" + firejail "${run}" + else + echo "No Firejail profile detected!" + echo "Skipping Firejail sandbox..." + "${run}" + fi +else + "${run}" +fi diff --git a/gog-xenonauts.desktop b/gog-xenonauts.desktop new file mode 100644 index 000000000000..7cfc5d19923e --- /dev/null +++ b/gog-xenonauts.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Xenonauts +Comment=Xenonauts - GOG Version +Exec=gog-xenonauts +Icon=gog-xenonauts +Type=Application +Terminal=false +StartupNotify=true +Categories=Game;AudioVideo; +Encoding=UTF-8 |