-
-
Save flying-sheep/9244a38e6165a3b1c5f3 to your computer and use it in GitHub Desktop.
Shank 2 PKGBUILD
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: fzerorubigd <fzerorubigd@gmail.com> | |
# Contributor: N30N <archlinux@alunamation.com> | |
# Contributor: swiftgeek <swiftgeek@gmail.com> | |
# Contributor: Marvn <mistrmarvn@gmail.com> | |
# Contributor: flying sheep <flying-sheep@web.de> | |
pkgname=shank2 | |
pkgver=update3 | |
pkgrel=1 | |
pkgdesc='A 2D side-scrolling beat ’em up.' | |
url='http://www.shankgame.com/' | |
license=('custom:commercial') | |
arch=('i686' 'x86_64') | |
groups=('humble-indie-bundle7' 'games') | |
depends=('sdl' 'libgl') | |
source=('shank2.sh' 'shank2.desktop') | |
sha1sums=('643c0420c130230da55cde0277f381eb5176b0cd' | |
'7a9fb9a54fe6d39c8fa795b76940ffb1bb1e47fe') | |
_archive="shank2-linux-$pkgver-1357159966.tar.gz" | |
_archive_sha1='c690a8c698c69e95d3f46c4ee35295c9ac97a64b' | |
PKGEXT='.pkg.tar' | |
package() { | |
_get_local_source $_archive --sha1 $_archive_sha1 || { | |
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 | |
else | |
_arch=32 | |
fi | |
install -Dm755 shank2.sh "$pkgdir/usr/bin/shank2" | |
install -Dm644 Shank2.xpm "$pkgdir/usr/share/shank2/Shank2.xpm" | |
install -Dm644 shank2.desktop "$pkgdir/usr/share/applications/shank2.desktop" | |
install -Dm755 bin/shank2-bin$_arch "$pkgdir/usr/share/shank2/bin/shank2" | |
install -d "$pkgdir/usr/share/shank2/lib" | |
install -Dm644 -t "$pkgdir/usr/share/shank2/lib" bin/lib$_arch/* | |
find data{,-pc} -type f -exec install -Dm644 {} "$pkgdir/usr/share/shank2/{}" \; | |
} | |
# 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 | |
} |
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
[Desktop Entry] | |
Type=Application | |
Name=Shank 2 | |
GenericName=Shank 2 | |
Comment=A 2D side-scrolling beat 'em up. | |
Categories=Game;ArcadeGame; | |
Path=/usr/share/shank2/ | |
Icon=/usr/share/shank2/Shank2.xpm | |
Exec=shank2 |
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
#!/bin/sh | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/shank2/lib/ | |
cd /usr/share/shank2/bin/ | |
exec ./shank2 "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment