1 # Maintainer: Yann Kaiser <kaiser.yann@gmail.com>
5 pkgdesc="A platform-adventure game set in a cave"
7 url="http://nicalis.com/games.php?game=cavestory"
9 depends=('libgl' 'mesa' 'glibc' 'gcc-libs'
10 'libxext' 'libx11' 'libxcb' 'libxau')
12 source=('cavestory+.sh' 'cavestory+.desktop' 'icon.png')
13 md5sums=('7d816d606a30ca7ded55489b9951d252'
14 '33f5ade058df392a17f934e6a4de8f00'
15 '2cc33b1b91383109cf1576a28215cdf7')
17 _archive_name="CaveStoryPlus"
18 _archive_md5="946a5a7315933728f9e4d56e8509bfc9"
20 _archive="${_archive_name}-linux.tar.gz"
25 if [ ! -f ${_csparchivelocation}${_archive} ]; then
26 if [ ! -f ${_archive} ] && [ -n "${_humblebundle4key}" ]; then
27 rm -f ${_archive}* index.html\?key\=${_humblebundle4key}*
28 wget http://www.humblebundle.com/?key=${_humblebundle4key}
29 wget $(cat index.html\?key\=${_humblebundle4key} | grep "${_archive}" | cut -d "'" -f 10)
30 mv ${_archive}* ${_archive}
31 elif [ -z "${_humblebundle4key}" ]; then
32 echo You can automate the download of the archive using the _humblebundle4key bash variable.
33 echo Just add \'export _humblebundle4key\=\<Your key here\>\' to \.bashrc
35 echo Otherwise please just place ${_archive} into $(pwd)/
36 echo Press Enter to continue
42 if [ ! -f ${_csparchivelocation}${_archive} ]; then
43 echo "${_csparchivelocation}${_archive} not found!"
47 if ! echo "${_archive_md5} ${_csparchivelocation}${_archive}" | md5sum -c --quiet; then
48 echo "Invalid checksum for ${_csparchivelocation}${_archive}"
52 bsdtar -xf ${_csparchivelocation}${_archive}
54 cd ${srcdir}/CaveStory+
57 cp ${srcdir}/${pkgname}.sh ${srcdir}/icon.png .
59 if test "${CARCH}" == "x86_64"; then
61 mv CaveStory+_64 CaveStory+
66 mkdir -p ${pkgdir}/opt/ ${pkgdir}/usr/bin/ \
67 ${pkgdir}/usr/share/applications
68 cp -r . ${pkgdir}/opt/${_archive_name}
69 cp ${srcdir}/${pkgname}.desktop ${pkgdir}/usr/share/applications/
70 ln -s /opt/${_archive_name}/${pkgname}.sh \
71 ${pkgdir}/usr/bin/${pkgname}
72 chmod a+r ${pkgdir}/usr/share/applications/${pkgname}.desktop \
73 ${pkgdir}/opt/${_archive_name}/icon.png
76 # vim: et ts=2 sw=2 sts=2