Created
June 8, 2012 15:10
-
-
Save zendeavor/2896079 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Yochai Gal <yochaigal@gmail.com> | |
pkgname=supermeatboy | |
pkgver=06072012 | |
pkgrel=5 | |
pkgdesc="Super Meat Boy is a tough as nails platformer where you play as an animated cube of meat." | |
url="http://www.supermeatboy.com/" | |
license=('custom') | |
arch=('i686' 'x86_64') | |
_groups=("humble-indie-bundle4" "humble-indie-bundle5" "games") | |
depends=('openal' 'sdl') | |
makedepends=('curl') | |
source=("${pkgname}-linux-${pkgver}-bin" "supermeatboy.desktop") | |
md5sums=("ceda8cdca2aaff63a9cae2ef7d7cf0d4" | |
"90a563ff103b4610b41af5fd2bccb21a") | |
PKGEXT=".pkg.tar" | |
_humblebundle() { | |
_archive="${source[0]%%:*}" | |
for group in "${_groups[@]}"; do | |
case "${group}" in | |
"humble-indie-bundle"*) _key="_humblebundle${group:19}key" ;; | |
*) continue ;; | |
esac | |
if [[ -n "${!_key}" ]]; then | |
_uri="$(curl -s http://www.humblebundle.com/downloads?key=${!_key} \ | |
| grep "${_archive}")" | |
_uri="${_uri##*data-web\=\'}" | |
_uri="${_uri%%\'*}" | |
source[0]="${_archive}::${_uri}" | |
break | |
else | |
warning "\"${_key}\" environment variable required for download handling not found." | |
fi | |
done | |
if [[ -z "${!_key}" && -f "${startdir}/${_archive}" ]]; then | |
error "Failed to download \"${_archive}\"." | |
exit 1 | |
fi | |
unset _archive _key _uri | |
} | |
build() { | |
unzip -n "${source[0]%%:*}" -d "${srcdir}" #|| true | |
} | |
package() { | |
mkdir -p ${pkgdir}/opt/ ${pkgdir}/usr/share/applications/ \ | |
${pkgdir}/usr/bin/ | |
cp -Tr ${srcdir}/smb/data ${pkgdir}/opt/supermeatboy/ | |
ln -s /opt/supermeatboy/SuperMeatBoy ${pkgdir}/usr/bin/supermeatboy | |
cp ${srcdir}/supermeatboy.desktop ${pkgdir}/usr/share/applications/ | |
chmod a+r ${pkgdir}/usr/share/applications/supermeatboy.desktop | |
# some cleanup | |
# rm -rf ${srcdir}/smb/ | |
# rm ${srcdir}/smb/data/{amd64,x86}/lib* | |
# if [[ "$CARCH" == "i686" ]]; then | |
# rm -rf ${srcdir}/smb/data/amd64 | |
# else | |
# rm -rf ${srcdir}/smb/data/x86 | |
# fi | |
} | |
_humblebundle | |
# vim: ft=PKGBUILD sts=2 ts=2 sw=2 et | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment