updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / shank / PKGBUILD
blob6e288a129470d390cb04d79099c44f985aef2aba
1 # Maintainer: N30N <archlinux@alunamation.com>
2 # Contributor: swiftgeek <swiftgeek@gmail.com>
3 # Contributor: Marvn <mistrmarvn@gmail.com>
5 pkgname="shank"
6 pkgver=120720110
7 pkgrel=3
8 pkgdesc="A 2D side-scrolling beat 'em up."
9 url="http://www.shankgame.com/"
10 license=("custom")
11 arch=("i686" "x86_64")
12 groups=("humble-indie-bundle4" "games")
13 if [ "${CARCH}" == "x86_64" ]; then
14         depends=("lib32-sdl" "lib32-libgl")
15 else
16         depends=("sdl" "libgl")
18 makedepends=("unzip")
19 source=("shank-linux-${pkgver}-1-bin::/dev/null" "shank.sh" "shank.desktop")
20 md5sums=("f42fb76ad67316c3d7fa5378ad9c5f57" \
21         "dd6523a1d46bab31a07178da66357e9d" \
22         "159eddeeba8a32d5c8932c8d802ad1af")
23 PKGEXT=".pkg.tar"
25 _humblebundle() {
26         _archive="${source[0]%%:*}"
27         for group in "${groups[@]}"; do
28                 case "${group}" in
29                         "humble-frozen-bundle") _key="_humblebundlefrozenkey" ;;
30                         "humble-frozen-synapse-bundle") _key="_humblebundlesynapsekey" ;;
31                         "humble-voxatron-debut") _key="_humblevoxatronkey" ;;
32                         "humble-indie-bundle"*)
33                                 _key="_humblebundle${group:19}key" ;;
34                         *) continue ;;
35                 esac
36                 if [ -n "${!_key}" ]; then
37                         msg "Getting your unique ${pkgname} download location."
38                         _uri="$(curl -s "http://www.humblebundle.com/?key=${!_key}" \
39                                 | grep "${_archive}" | cut -d "'" -f 10)"
40                         source[0]="${_archive}::${_uri}"
41                         break
42                 else
43                         warning "\"${_key}\" environment variable required for download handling not found."
44                 fi
45         done
46         if [ -z "${!_key}" -a ! -f "${startdir}/${_archive}" ]; then
47                 error "Unable to download \"${_archive}\"."
48                 exit 1
49         fi
50         unset _archive _key _uri
53 build() {
54         unzip -n "${source[0]%%:*}" || true
57 package() {
58         install -Dm755 shank.sh "${pkgdir}/usr/bin/shank"
59         install -Dm644 shank.desktop "${pkgdir}/usr/share/applications/shank.desktop"
61         cd data
62         install -Dm644 bin/.DS_Store "${pkgdir}/opt/shank/bin/.DS_Store"
63         install -m755 bin/{libfmodevent-4.30.02.so,libfmodex-4.30.02.so,Shank} \
64                 "${pkgdir}/opt/shank/bin"
65         find {data,data-pc,reslists} -type f \
66                 -exec install -Dm644 "{}" "${pkgdir}/opt/shank/{}" \;
69 _humblebundle
71 # vim: set noet ff=unix: