summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD95
-rw-r--r--superhexagon.desktop8
-rw-r--r--superhexagon.install10
-rwxr-xr-xsuperhexagon.sh9
-rw-r--r--superhexagonrc.example6
6 files changed, 79 insertions, 66 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 68a99bb2e47b..9ac75f48e079 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,31 @@
+# Generated by mksrcinfo v8
+# Sat Oct 29 19:42:08 UTC 2016
pkgbase = superhexagon
pkgdesc = A minimal action game by Terry Cavanagh, with music by Chipzel
pkgver = 16
- pkgrel = 2
+ pkgrel = 3
url = http://superhexagon.com/
install = superhexagon.install
arch = i686
arch = x86_64
- groups = games
- license = unknown
- makedepends = unzip
+ license = custom
depends = gcc-libs
depends = freeglut
depends = libvorbis
depends = openal
depends = glu
depends = glew1.6
+ noextract = super-hexagon-linux-16-bin-1366677959
source = hib://super-hexagon-linux-16-bin-1366677959
+ source = superhexagon.sh
source = superhexagon.desktop
source = superhexagon.install
+ source = superhexagonrc.example
sha256sums = 2c6dfba53cb0dd58bcbff519862af8bf7af67475845bb43207e9d32032efa104
- sha256sums = 5a17e0ecb042af80754de5d9724521207cf1b49f0bceeeb9abe3e125a586bfef
- sha256sums = ba4062a89d569bc4af4d21c6660093e10d189715031630c4f7c6712452a03b40
+ sha256sums = fecc1b8c99b3758ac705ed6f8eedb8a28434d2cdd91deec457e192b3be280273
+ sha256sums = 6399b71d49dc5e313b6e882ae51b33df043b945ae102666c94a457cfaac15e4e
+ sha256sums = 1f183c17982dd12f8a1ccd310d27c74eaf83f550571e8e6ff77cc735f29b55b7
+ sha256sums = ff966f4106571ae7e5906bb2a47944d03c3ec73e280f43c1693da8121df80a81
pkgname = superhexagon
diff --git a/PKGBUILD b/PKGBUILD
index 956b31c300fc..31ef148f0dc1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,28 @@
-# Maintainer: J0k3r <moebius282 at gmail dot com>
+# Contributor: J0k3r <moebius282 at gmail dot com>
+# Maintainer: Eric Anderson <ejona86@gmail.com>
pkgname=superhexagon
pkgver=16
-pkgrel=2
+pkgrel=3
pkgdesc="A minimal action game by Terry Cavanagh, with music by Chipzel"
-url="http://superhexagon.com/"
-license=('unknown')
arch=('i686' 'x86_64')
-groups=("games")
+url="http://superhexagon.com/"
+license=('custom')
depends=('gcc-libs' 'freeglut' 'libvorbis' 'openal' 'glu' 'glew1.6')
-makedepends=('unzip')
install="${pkgname}.install"
-_purgelibs=('libglut.so.3' 'libogg.so.0' 'libopenal.so.1' 'libstdc++.so.6' 'libvorbis.so.0' 'libvorbisfile.so.3' 'libGLEW.so.1.6')
_binver="1366677959"
-_archivename="super-hexagon-linux-${pkgver}-bin-${_binver}"
-source=("hib://${_archivename}"
+_gamepkg="super-hexagon-linux-${pkgver}-bin-${_binver}"
+source=("hib://${_gamepkg}"
+ "${pkgname}.sh"
"${pkgname}.desktop"
- "${pkgname}.install")
+ "${pkgname}.install"
+ "${pkgname}rc.example")
+noextract=("${_gamepkg}")
sha256sums=('2c6dfba53cb0dd58bcbff519862af8bf7af67475845bb43207e9d32032efa104'
- '5a17e0ecb042af80754de5d9724521207cf1b49f0bceeeb9abe3e125a586bfef'
- 'ba4062a89d569bc4af4d21c6660093e10d189715031630c4f7c6712452a03b40')
-#PKGEXT=".pkg.tar"
-
+ 'fecc1b8c99b3758ac705ed6f8eedb8a28434d2cdd91deec457e192b3be280273'
+ '6399b71d49dc5e313b6e882ae51b33df043b945ae102666c94a457cfaac15e4e'
+ '1f183c17982dd12f8a1ccd310d27c74eaf83f550571e8e6ff77cc735f29b55b7'
+ 'ff966f4106571ae7e5906bb2a47944d03c3ec73e280f43c1693da8121df80a81')
# You can download the Humble Indie Bundle file manually, or you can configure
# DLAGENTS in makepkg.conf to auto-download.
@@ -35,48 +36,38 @@ sha256sums=('2c6dfba53cb0dd58bcbff519862af8bf7af67475845bb43207e9d32032efa104'
# DLAGENTS=('hib::/usr/bin/find /path/to/downloads -name $(echo %u | cut -c 7-) -exec ln -s \{\} %o \; -quit')
DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Download manually to \"$(pwd)\" or setup hib:// DLAGENT in /etc/makepkg.conf."; exit 1')
+prepare() {
+ cd "${srcdir}"
+
+ mkdir -p "${pkgname}-${pkgver}"
+ bsdtar -x -C "${pkgname}-${pkgver}" -f "${_gamepkg}"
+}
package()
{
- mkdir -p "${pkgdir}/opt/${pkgname}/"
-
-# unzip is stupid..
- unzip -qq "${srcdir}/${_archivename}" -d "${pkgdir}/opt/tmp/" 'data/*' || true
-
- mv "${pkgdir}/opt/tmp/data/"* "${pkgdir}/opt/${pkgname}/"
- rm -r "${pkgdir}/opt/tmp/"
-
- if [[ "$CARCH" == "x86_64" ]]; then
-
- rm -r "${pkgdir}/opt/${pkgname}/x86/"
- for i in "${_purgelibs[@]}"; do
- rm "${pkgdir}/opt/${pkgname}/x86_64/${i}"
- done
-
- # msg "Patching files ..."
- # mv -f "${srcdir}/x86_64/superhexagon.x86_64" "${pkgdir}/opt/${pkgname}/x86_64/"
-
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ cd data
+ install -d "${pkgdir}/opt/${pkgname}"
+ install -m644 -t "${pkgdir}/opt/${pkgname}" \
+ Linux.README \
+ "${srcdir}/${pkgname}rc.example"
+ cp -r data "${pkgdir}/opt/${pkgname}"
+ rm "${pkgdir}/opt/${pkgname}/data/license.txt"
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ install -m755 x86_64/${pkgname}.x86_64 \
+ "${pkgdir}/opt/${pkgname}/${pkgname}"
else
-
- rm -r "${pkgdir}/opt/${pkgname}/x86_64/"
- for i in "${_purgelibs[@]}"; do
- rm "${pkgdir}/opt/${pkgname}/x86/${i}"
- done
-
- # msg "Patching files ..."
- # mv -f "${srcdir}/x86/superhexagon.x86" "${pkgdir}/opt/${pkgname}/x86/"
-
+ install -m755 x86/${pkgname}.x86 \
+ "${pkgdir}/opt/${pkgname}/${pkgname}"
fi
-# patching the included startup script so it supports being symlinked
-# removing the steam bits out of the lib search path; i don't know why it contains a steam dir in the non-steam version..
- sed -i \
- -e 's|`dirname "$0"`|$(dirname \"$(readlink -f \"$0\")\")|' \
- "${pkgdir}/opt/${pkgname}/SuperHexagon"
-
- mkdir -p "${pkgdir}/usr/bin/"
- ln -s "/opt/${pkgname}/SuperHexagon" "${pkgdir}/usr/bin/${pkgname}"
-
- install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -D -m644 "${pkgdir}/opt/${pkgname}/SuperHexagon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -D -m755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+ install -D -m644 "SuperHexagon.png" \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ install -D -m644 "${srcdir}/${pkgname}.desktop" \
+ "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm644 data/license.txt \
+ "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}
diff --git a/superhexagon.desktop b/superhexagon.desktop
index d5f7b5c5b317..0c935ab0bbfc 100644
--- a/superhexagon.desktop
+++ b/superhexagon.desktop
@@ -2,10 +2,8 @@
Encoding=UTF-8
Value=1.0
Type=Application
-Name=SuperHexagon
-GenericName=SuperHexagon
+Name=Super Hexagon
Comment=A minimal action game by Terry Cavanagh, with music by Chipzel
-Icon=superhexagon.png
-Exec=superhexagon
+Exec=/usr/bin/superhexagon
+Icon=superhexagon
Categories=Game;
-Path=/opt/superhexagon
diff --git a/superhexagon.install b/superhexagon.install
index efceb150f604..d03ed1f1f8fc 100644
--- a/superhexagon.install
+++ b/superhexagon.install
@@ -1,10 +1,14 @@
post_install()
{
- echo 'You can configure the fullscreen resolution of the game in the startup script "/usr/bin/superhexagon"'
- echo 'This will fix fullscreen with multihead setups! yay!'
+ echo 'See /opt/superhexagon/superhexagonrc.example for how to configure'
+ echo 'fullscreen resolution. This fixes fullscreen with multihead setups!'
}
post_upgrade()
{
- post_install
+ if [ "${2%-*}" -le 16 ]; then
+ echo 'Fullscreen resolution configuration has been moved to '
+ echo '$HOME/.config/superhexagonrc to prevent overwriting during upgrade.'
+ post_install
+ fi
}
diff --git a/superhexagon.sh b/superhexagon.sh
new file mode 100755
index 000000000000..c098283c4c95
--- /dev/null
+++ b/superhexagon.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Provide a chance to configure GLUT. For an example, see
+# /opt/superhexagon/superhexagonrc.example
+CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}"
+test -f "$CONFIG" && . "$CONFIG"
+
+cd /opt/superhexagon
+exec ./superhexagon
diff --git a/superhexagonrc.example b/superhexagonrc.example
new file mode 100644
index 000000000000..20549755729f
--- /dev/null
+++ b/superhexagonrc.example
@@ -0,0 +1,6 @@
+# Example superhexagonrc. Place this file in $HOME/.config/superhexagonrc
+
+# Display settings, because GLUT is a derp
+# Thanks to BtbN for this idea!
+export HEX_WIDTH=1920
+export HEX_HEIGHT=1200