# Contributor: robb_force <robb_force@holybuffalo.net>
# Editied by fana-m
pkgname=raine
pkgver=0.51.8
pkgrel=1
pkgdesc="A multiple arcade emulator mainly focused on Taito and Jaleco games."
url="http://rainemu.swishparty.co.uk/"
license=('unknown')
arch=('i686')
depends=('sdl_ttf' 'sdl_image' 'muparser')
makedepends=('nasm')
source=(http://rainemu.swishparty.co.uk/html/archive/${pkgname}s-${pkgver}.tar.bz2 \
raine.sh)
install=raine.install
md5sums=('bcaf2313c853fd4a826771dfa0a38ca5'
'edf8de56509e6176b5b5feb25b2c13f0')
build()
{
cd ${startdir}/src/${pkgname}-${pkgver}
# The makefile seems to have the cpu detection out of sequence, so
# do it first.
sh ./detect-cpu
# Fix share directory for Arch and install the binary to /usr/share/raine
sed -e 's/\$(prefix)\/games/\$(prefix)\/bin/' \
-e 's|/share/games|/share|' \
-e 's|/usr/bin/install|/bin/install|' \
-e 's|$(RAINE_EXE) $(bindir)|$(RAINE_EXE) $(rainedata)|' \
-i makefile
make || return 1
make DESTDIR=${startdir}/pkg install
# Install the raine script to get around problems finding the fonts
cd ${startdir}/src
install -m755 raine.sh ${startdir}/pkg/usr/bin/${pkgname}
}