updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / vvvvvv / PKGBUILD
blobdbdd31560b2637dc7d94b60e678ec91819d1e028
1 # Maintainer: gadget3000 <gadget3000 at msn dot com>
2 # Contributor: mikers <mikeonthecomputer at gmail dot com>
4 pkgname=vvvvvv
5 pkgver=2.01
6 _build=
7 pkgrel=2
8 pkgdesc="A retro styled 2D platformer"
9 arch=('i686' 'x86_64')
10 url="http://thelettervsixtim.es/"
11 groups=('humblebundle3' 'humblebundle4' 'humblebundles')
12 license=('unknown')
13 depends=('sdl_image' 'sdl_mixer' 'gcc-libs')
14 source=('vvvvvv.desktop')
15 sha256sums=('a5eea031606f206b14f752eee7079fb18b6462fd751087d4641ca1831beb867f')
17 _archive="VVVVVV_${pkgver}_Linux${_build}.tar.gz"
18 _archive_md5="54d3679da69d92adb65fe9633f3c67d7"
20 build() {
21   cd $srcdir
22   
23   if [ ! -f ${_vvvvvvarchivelocation}${_archive} ]; then
24           if [ ! -f ${_archive} ] && [ -n "${_humblebundle3key}" ]; then
25                 rm -f ${_archive}* index.html\?key\=${_humblebundle3key}*
26                 wget http://www.humblebundle.com/?key=${_humblebundle3key}
27                 wget $(cat index.html\?key\=${_humblebundle3key} | grep "${_archive}" | cut -d "'" -f 10)
28                 mv ${_archive}* ${_archive}
29           elif [ ! -f ${_archive} ] && [ -n "${_humblebundle4key}" ]; then
30                 rm -f ${_archive}* index.html\?key\=${_humblebundle4key}*
31                 wget http://www.humblebundle.com/?key=${_humblebundle4key}
32                 wget $(cat index.html\?key\=${_humblebundle4key} | grep "${_archive}" | cut -d "'" -f 10)
33                 mv ${_archive}* ${_archive}
34           elif [ -z "${_humblebundle3key}" ] && [ -z "${_humblebundle4key}" ]; then
35                 echo You can now automate the download of the archive using the _humblebundle3key or _humblebundle4key bash variables.
36                 echo Just add \'export _humblebundle3key\=\<Your key here\>\' and/or
37                 echo \'export _humblebundle4key\=\<Your key here\>\' to \.bashrc
38                 echo
39                 echo Otherwise please just place ${_archive} into $(pwd)/
40                 echo Press Enter to continue
41                 read -a _unused
42           fi
43   fi
45   if [ ! -f ${_vvvvvvarchivelocation}${_archive} ]; then
46     echo "${_vvvvvvarchivelocation}${_archive} not found!"
47     return 1
48   fi  
50   if ! echo "${_archive_md5}  ${_vvvvvvarchivelocation}${_archive}" | md5sum -c --quiet; then
51     echo "Invalid checksum for ${_vvvvvvarchivelocation}${_archive}"
52     return 1
53   fi
55   install -d ${pkgdir}/usr/share/
56   tar xzf ${_vvvvvvarchivelocation}${_archive} -C ${pkgdir}/usr/share/
57   rm -fr ${pkgdir}/usr/share/VVVVVV/LIB{32,64}
58   if [ "$CARCH" = "x86_64" ]; then
59     rm -fr ${pkgdir}/usr/share/VVVVVV/VVVVVV_32
60   else
61     rm -fr ${pkgdir}/usr/share/VVVVVV/VVVVVV_64
62   fi
63   install -d ${pkgdir}/usr/bin
64   ln -s /usr/share/VVVVVV/VVVVVV ${pkgdir}/usr/bin/vvvvvv
65   
66   # Install the icon file
67   install -D -m 644 ${pkgdir}/usr/share/VVVVVV/data/icons/32_2.png \
68       ${pkgdir}/usr/share/pixmaps/vvvvvv_icon.png
70   # Install desktop file
71   install -D -m 644 ${srcdir}/vvvvvv.desktop \
72       ${pkgdir}/usr/share/applications/vvvvvv.desktop
74   chown -Rh root:root ${pkgdir}/usr/share/VVVVVV