# Maintainer: TryA <tryagainprod {at} gmail.com>
# Contributor: mirandir <mirandir AT orange DOT fr>
pkgname=braid
_gamepkg="braid-linux-build2.run.bin"
pkgver=1.0
pkgrel=5
pkgdesc="A puzzle-platformer where the player manipulates the flow of time in strange and unusual ways \
(requires copy of the full game)"
url="http://braid-game.com"
license=('custom: "commercial"')
arch=('i686' 'x86_64')
depends=('sdl' 'mesa' 'sh')
optdepends=('libtxc_dxtn: mandatory S3TC implementation for free DRI drivers')
makedepends=('unzip')
source=('braid.desktop' 'braid.sh')
md5sums=('5ab9e39da4209196fbf4a3d4121287e0'
'773db3f2c423722d9ba04146195204c8')
options=(!strip)
build() {
cd ${srcdir}
msg "You need a full copy of this game in order to install it"
msg "Searching for ${_gamepkg} in dir: $(readlink -f `pwd`/..)"
if [[ -f "../${_gamepkg}" ]]; then
msg "Found game package, installing..."
ln -fs ../${_gamepkg} .
unzip braid-linux-build2.run.bin || true
else
error "Game package not found, please type absolute path to ${_gamepkg}:"
read pkgpath
if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then
error "Unable to find game package."
return 1
else
msg "Found game package, installing..."
ln -fs "${pkgpath}/${_gamepkg}" .
unzip braid-linux-build2.run.bin || true
fi
fi
# data
mkdir ${pkgdir}/opt
cp -r data/gamedata/ ${pkgdir}/opt/Braid
if [ "${CARCH}" == "x86_64" ]; then
_arch=amd64
else
_arch=x86
fi
cp data/${_arch}/libCg.so ${pkgdir}/opt/Braid
cp data/${_arch}/libCgGL.so ${pkgdir}/opt/Braid
cp data/${_arch}/braid ${pkgdir}/opt/Braid
# startup script
install -D ${srcdir}/braid.sh ${pkgdir}/usr/bin/braid
# desktop icon
install -Dm644 ${srcdir}/braid.desktop ${pkgdir}/usr/share/applications/braid.desktop
install -Dm644 ${srcdir}/data/gamedata/braid.png ${pkgdir}/usr/share/pixmaps/braid.png
}