1 # Maintainer: Loren <smallphrosty gmail com>
3 pkgname=chocolate-castle
6 pkgdesc="A tricky sliding block puzzle game. You must purchase the game. (The Humble Voxatron Bundle)"
7 url='http://www.lexaloffle.com/choc.php'
8 groups=('humblevoxatronbundle' 'humblebundles')
9 license=('custom: "commercial"')
10 source=(${pkgname}.bmp
13 md5sums=('ce3b8bd4ab328405c10147e6bfeccc9b'
14 '22498f99411e519c2239a52d28872e61'
15 'a401a711742eb8501a52b793565b74d5')
16 arch=('i686' 'x86_64')
17 [ "${CARCH}" = "x86_64" ] && depends=('lib32-libgl' 'lib32-sdl')
18 [ "${CARCH}" = "i686" ] && depends=('libgl' 'sdl')
20 _gamepkg="${pkgname}_${pkgver//_/-}_i386.tar.gz"
25 msg "You need a full copy of this game in order to install it"
26 msg "Searching for ${_gamepkg} in dir: $(readlink -f `pwd`/..)"
27 if [[ -f "../${_gamepkg}" ]]; then
28 msg "Found game package, installing..."
29 ln -fs "../${_gamepkg}" .
30 elif [ -n "${_humblevoxatronkey}" ]; then
31 msg "Game package not found, trying to download..."
32 rm -f index.html\?key\=${_humblevoxatronkey}*
33 wget http://www.humblebundle.com/?key=${_humblevoxatronkey}
34 wget $(cat index.html\?key\=${_humblevoxatronkey} | grep "${_gamepkg}" | cut -d "'" -f 10)
35 mv ${_gamepkg}* ${_gamepkg}
37 msg "Game package not found and download failed."
38 msg "You can add \'export _humblevoxatronkey=<Your key here>\' to \.bashrc if you want automated download ability."
39 error "Please type absolute path to ${_gamepkg} (/home/joe):"
41 if [[ -f "${pkgpath}/${_gamepkg}" ]]; then
42 msg "Found game package, installing..."
43 ln -fs "${pkgpath}/${_gamepkg}" .
45 error "Unable to find game package."
49 install -d $pkgdir/opt/${pkgname}
50 bsdtar -xf $srcdir/${_gamepkg}
51 cp -r $srcdir/choc/* $pkgdir/opt/${pkgname}
52 rm $pkgdir/opt/$pkgname/libSDL-1.2.so.0
57 # Install Desktop File and Icon
58 install -D -m 644 $srcdir/${pkgname}.bmp \
59 $pkgdir/usr/share/pixmaps/${pkgname}.bmp
60 install -D -m 644 $srcdir/${pkgname}.desktop \
61 $pkgdir/usr/share/applications/${pkgname}.desktop
62 # Install Game Launcher
63 install -D -m 755 $srcdir/${pkgname}.launcher \
67 install -Dm 644 "${pkgdir}"/opt/${pkgname}/license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/license