1 # Maintainer: jose <jose1711 [at] gmail (dot) com>
6 pkgdesc="physics-based platform game (full version)"
8 url="http://www.andyetitmoves.net/"
9 license=("custom:shareware")
10 source=("andyetitmoves.desktop")
11 depends=("mesa" "libxft" "sdl_image" "libvorbis" "libpng12")
13 md5sums=('4f4792260832fe1b52ca8150a03ca176')
15 [ "$CARCH" = "i686" ] && depends=(${depends[@]} openal libtheora)
16 [ "$CARCH" = "x86_64" ] && depends=(${depends[@]} lib32-openal lib32-libtheora lib32-libpng12 lib32-libvorbis lib32-sdl_image)
18 [ "$CARCH" = "i686" ] && gamepkg="andyetitmoves-${pkgver}-1_i386.tar.gz"
19 [ "$CARCH" = "x86_64" ] && gamepkg="andyetitmoves-${pkgver}-1_x86_64.tar.gz"
21 [ "$CARCH" = "i686" ] && gamesum='c530630520f062db1d402d99fb25a725'
22 [ "$CARCH" = "x86_64" ] && gamesum='86544c86a117a653221c38ebfa58c68d'
27 msg "You need a full copy of this game in order to install it"
28 msg "Searching for ${gamepkg} in dir: \"$startdir\""
30 if [[ ! -f "$startdir/${gamepkg}" ]]; then
31 error "Game package not found, please type absolute path to \"${gamepkg}\" (/home/joe/downloads) or enter HIB key (e. g. abcdefgh1234):"
33 if echo ${pkgpath} | egrep -q "^\s*/"; then
34 if [[ ! -f "${pkgpath}/${gamepkg}" ]]; then
35 error "Unable to find game package." && return 1
39 echo "your key is: ${key}"
41 downurl=$(wget -qO - http://www.humblebundle.com/?key=${key} | sed -n '/'${gamepkg}'/s/.* href='\''\(.*\)'\'' data-web=.*/\1/p')
43 if [ -z "${downurl}" ]; then
44 error "provided key seems to be invalid or something has changed on hib website"
47 wget -O ${pkgpath}/${gamepkg} "${downurl}" || rm ${pkgpath}/${gamepkg}
50 if [ "$(/usr/bin/md5sum ${pkgpath}/${gamepkg} | awk '{print $1}')" != ${gamesum} ]; then
51 error "md5sum does not match"
54 msg "Found game package, installing."
55 tar xvf ${pkgpath}/${gamepkg}
60 cd $srcdir/AndYetItMoves
61 mkdir -p $pkgdir/usr/{share/AndYetItMoves,bin}
62 /bin/tar cf - * | ( cd ../../pkg/usr/share/AndYetItMoves/; tar xfp - )
63 ln -s /usr/share/AndYetItMoves/AndYetItMoves $pkgdir/usr/bin/AndYetItMoves
64 install -D -m644 icons/48x48.png $pkgdir/usr/share/pixmaps/andyetitmoves.png
65 install -D -m644 $srcdir/andyetitmoves.desktop $pkgdir/usr/share/applications/andyetitmoves.desktop