3 pkgname=blocks-that-matter
6 pkgdesc="Platformer with puzzle elements that form a mix of Tetris and Minecraft."
7 url="http://www.swingswingsubmarine.com/games/blocks-that-matter/"
8 license=('custom: "commercial"')
9 groups=('humblevoxatronbundle' 'humblebundles')
10 arch=('i686' 'x86_64')
11 depends=('java-runtime' 'bash')
12 [ "${CARCH}" = "x86_64" ] && depends=("${depends[@]}" 'lib32-libxcursor' 'lib32-libxrandr')
13 [ "${CARCH}" = "i686" ] && depends=("${depends[@]}" 'libxcursor' 'libxrandr')
14 [ "${CARCH}" = "x86_64" ] && optdepends=('lib32-alsa-lib: sound support' 'lib32-openal: sound support')
15 [ "${CARCH}" = "i686" ] && optdepends=('alsa-lib: sound support' 'openal: sound support')
18 source=("${pkgname}.desktop" "btm-exec" "${pkgname}-icon.png")
19 sha256sums=('b3f9934c39624d7ac31f7de8fa660f0f150d383339fa3cea269f33442c006439'
20 'a5245828006404ebb4f324727fa98deb149a84b076bd24bf5b1e49443bb9c2a5'
21 'd6f8b24e1545009c7598be0bb0b36c40123a14210f4654813c85fbccd174c0f2')
22 [ "${CARCH}" = "x86_64" ] && ext="x64"
23 [ "${CARCH}" = "i686" ] && ext="x86"
24 _gamepkg="blocks-matter_${pkgver}_${ext}.tar.gz"
28 msg "You need a full copy of this game in order to install it"
29 msg "Searching for ${_gamepkg} in dir: $(readlink -f `pwd`/..)"
30 if [[ -f "../${_gamepkg}" ]]; then
31 msg "Found game package, installing..."
32 ln -fs "../${_gamepkg}" .
33 elif [ -n "${_humblevoxatronkey}" ]; then
34 msg "Game package not found, trying to download..."
35 rm -f index.html\?key\=${_humblevoxatronkey}*
36 wget http://www.humblebundle.com/?key=${_humblevoxatronkey}
37 wget $(cat index.html\?key\=${_humblevoxatronkey} | grep "${_gamepkg}" | cut -d "'" -f 10)
38 mv ${_gamepkg}* ${_gamepkg}
40 msg "Game package not found and download failed."
41 msg "You can add \'export _humblevoxatronkey\=\<Your key here\>\' to \.bashrc if you want automated download ability."
42 error "Please type absolute path to ${_gamepkg} (/home/joe):"
44 if [[ -f "${pkgpath}/${_gamepkg}" ]]; then
45 msg "Found game package, installing..."
46 ln -fs "${pkgpath}/${_gamepkg}" .
48 error "Unable to find game package."
53 install -d "${pkgdir}/opt/${pkgname}"
54 cp -R "${srcdir}"/blocks-matter_${pkgver}_${ext}/* "${pkgdir}/opt/${pkgname}/"
55 #Use system-wide OpenAL library instead of the provided lib versions
56 rm "${pkgdir}/opt/${pkgname}/libopenal64.so"
57 rm "${pkgdir}/opt/${pkgname}/libopenal.so"
58 chmod +rx ${pkgdir}/opt/${pkgname}/*.sh
59 chmod +rx ${pkgdir}/opt/${pkgname}/*.so
60 chmod +rx ${pkgdir}/opt/${pkgname}/*.jar
61 chmod +rx ${pkgdir}/opt/${pkgname}/BTM.bftm
62 chmod -R +rx "${pkgdir}/opt/${pkgname}/BTM_lib"
63 chmod -R +rx "${pkgdir}/opt/${pkgname}/lib"
64 chmod -R +rx "${pkgdir}/opt/${pkgname}/README"
65 chmod -R +rx "${pkgdir}/opt/${pkgname}/Community"
66 chmod -R +wrx "${pkgdir}/opt/${pkgname}/config"
67 chmod -R +wrx "${pkgdir}/opt/${pkgname}/Blocks That Matter Save"
73 install -d "${pkgdir}/usr/bin/"
74 install -D -m755 "${srcdir}/btm-exec" "${pkgdir}/usr/bin/${pkgname}"
75 # Install Desktop File and Icon
76 install -D -m644 "${srcdir}/${pkgname}.desktop" \
77 "${pkgdir}/usr/share/applications/${pkgname}.desktop"
78 install -D -m644 "${srcdir}/${pkgname}-icon.png" \
79 "${pkgdir}/usr/share/icons/${pkgname}-icon.png"