1 # Maintainer: Gadget3000 <gadget3000 at msn dot com>
2 # Contributor: Otto Allmendinger <otto.allmendinger@gmail.com>
4 pkgname=crayonphysicsdeluxe
7 pkgdesc="A 2D physics puzzle / sandbox game, in which your drawings are transformed into objects"
9 url="http://www.crayonphysics.com/"
11 groups=('humblebundle3' 'humbleintbundle' 'humblebundles')
12 if [ "$CARCH" = "x86_64" ]; then
13 depends=('lib32-qt' 'lib32-sdl_image' 'lib32-sdl_mixer' 'lib32-glew1.5')
15 depends=('qt' 'sdl_image' 'sdl_mixer' 'glew1.5')
17 makedepends=("imagemagick")
18 install=("CrayonPhysicsDeluxe.install")
19 source=("CrayonPhysicsDeluxe.desktop" "crayon.sh")
20 md5sums=('77b35434d5d3d52f7f6071caf306f1d1'
21 'd5425616d72038aa387a23b0974aa931')
23 _archive="crayon-physics-deluxe_${pkgver/_*/}_i386.tar.gz"
24 _archive_md5="03855655d3f4d6ef49ebd31b12476c80"
29 if [ ! -f ${_crayonarchivelocation}${_archive} ]; then
30 if [ -n "${_crayonarchivelocation}" ] && [ $(echo ${_crayonarchivelocation} | rev | cut -c 1) != "/" ]; then
31 echo _crayonarchivelocation must end in /
34 if [ ! -f ${_archive} ] && [ -n "${_humblebundle3key}" ]; then
35 rm -f ${_archive}* index.html\?key\=${_humblebundle3key}*
36 wget http://www.humblebundle.com/?key=${_humblebundle3key}
37 wget $(cat index.html\?key\=${_humblebundle3key} | grep "${_archive}" | cut -d "'" -f 10)
38 mv ${_archive}* ${_archive}
39 elif [ ! -f ${_archive} ] && [ -n "${_humbleintbundlekey}" ]; then
40 rm -f ${_archive}* index.html\?key\=${_humbleintbundlekey}*
41 wget http://www.humblebundle.com/?key=${_humbleintbundlekey}
42 wget $(cat index.html\?key\=${_humbleintbundlekey} | grep "${_archive}" | cut -d "'" -f 10)
43 mv ${_archive}* ${_archive}
44 elif [ -z "${_humblebundle3key}" ] && [ -z "${_humbleintbundlekey}" ]; then
45 echo You can automate the download of the archive using the _humblebundle3key or _humbleintbundlekey bash variables.
46 echo Just add \'export _humblebundle3key\=\<Your key here\>\' and/or
47 echo \'export _humbleintbundlekey\=\<Your key here\>\' to \.bashrc
49 echo Otherwise please just place ${_archive} into $(pwd)/
50 echo Press Enter to continue
55 if [ ! -f ${_crayonarchivelocation}${_archive} ]; then
56 echo "${_crayonarchivelocation}${_archive} not found!"
60 if ! echo "${_archive_md5} ${_crayonarchivelocation}${_archive}" | md5sum -c --quiet; then
61 echo "Invalid checksum for ${_crayonarchivelocation}${_archive}"
65 install -d ${pkgdir}/usr/share/CrayonPhysicsDeluxe/
66 tar xzf ${_crayonarchivelocation}${_archive} -C ${pkgdir}/usr/share/CrayonPhysicsDeluxe/
67 rm -rf ${pkgdir}/usr/share/CrayonPhysicsDeluxe/lib32
69 chmod +x ${pkgdir}/usr/share/CrayonPhysicsDeluxe/launcher
70 install -d ${pkgdir}/usr/bin
72 for i in 16x16 22x22 32x32 48x48 64x64 128x128; do
73 mkdir -p ${pkgdir}/usr/share/icons/hicolor/${i}/apps
74 convert -resize ${i} \
75 ${pkgdir}/usr/share/CrayonPhysicsDeluxe/icon.png \
76 ${pkgdir}/usr/share/icons/hicolor/${i}/apps/CrayonPhysicsDeluxe.png
79 install -Dm644 ${srcdir}/CrayonPhysicsDeluxe.desktop \
80 ${pkgdir}/usr/share/applications/CrayonPhysicsDeluxe.desktop
82 install -D -m644 ${pkgdir}/usr/share/CrayonPhysicsDeluxe/LICENSE.txt \
83 ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
85 install -Dm755 ${srcdir}/crayon.sh ${pkgdir}/usr/bin/crayon
87 chown -Rh root:root ${pkgdir}/usr/share/CrayonPhysicsDeluxe