@@ -13,23 +13,15 @@ | |
arch=('i686' 'x86_64') | |
groups=('humble-indie-bundle7' 'games') | |
depends=('sdl' 'libgl') | |
-source=('shank2.sh' 'shank2.desktop') | |
-sha1sums=('b6ce1311e04c65243ee2159f877fba539121887e' | |
+source=("hib://shank2-linux-$pkgver.tgz" "shank2.sh" "shank2.desktop") | |
+sha1sums=('246df822375a97ab4e3a74353b5a33e9b4a54934' | |
+ 'b6ce1311e04c65243ee2159f877fba539121887e' | |
'6a2267ea66fce90dea94ff3964ab704751f18ee5') | |
- | |
-_archive="shank2-linux-$pkgver.tgz" | |
-_archive_md5='9f094de86c40c902aa90c9609575fc49' | |
- | |
+DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Manually download it to \"$(pwd)\", or set up a hib:// DLAGENT in /etc/makepkg.conf."; exit 1') | |
PKGEXT='.pkg.tar' | |
package() { | |
- _get_local_source $_archive --md5 $_archive_md5 || { | |
- error "Unable to find the game archive. Please download it from your Humble Bundle page, and place it into one of the above locations." | |
- exit 1 | |
- } | |
- | |
cd "$srcdir" | |
- tar xf "$_archive" || true | |
if [ $CARCH == 'x86_64' ]; then | |
_arch=64 | |
@@ -49,20 +41,3 @@ | |
find data{,-pc} -type f -exec install -Dm644 {} "$_install_dir/{}" \; | |
} | |
- | |
-# Locates a file or folder provided by the user, and symlinks it into $srcdir | |
-_get_local_source() { | |
- msg "Looking for '$1'..."; rm -f "$srcdir/$1" | |
- declare -A _search=(['build dir']="$startdir" | |
- ['$LOCAL_PACKAGE_SOURCES']="$LOCAL_PACKAGE_SOURCES") | |
- for _key in "${!_search[@]}"; do local _dir="${_search["$_key"]}" | |
- echo -n " - in $_key [${_dir:-<undefined>}] ... "; | |
- if [[ -z "$_dir" || ! -e "$_dir/$1" ]]; then | |
- echo "NOT FOUND" | |
- elif [[ -n $2 && "$(${2#--}sum "$_dir/$1"|awk '{print $1}')" != $3 ]]; then | |
- echo "CHECKSUM FAILED"; | |
- else | |
- echo "FOUND"; ln -sfT "$(readlink -f "$_dir/$1")" "$srcdir/$1"; break; fi | |
- done | |
- if [ ! -e "$srcdir/$1" ]; then return 1; fi | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment