# Maintainer: ZekeSulastin <zekesulastin@gmail.com>
# Contributor: Mr_Robotic_Evil <mr.robotic.evil@googlemail.com>
# Contributor: Lone_Wolf <lonewolf@xs4all.nl>
# This PKGBUILD only generates the engine binary.
# The retail Freespace 2 data is required to play the
# original game and most mods. You can use a non-AUR/pacman'd
# copy, but you'll be on your own as far as running the game
# and mods are concerned.
# Check the AUR package 'fs2_open-data' for details.
pkgname=fs2_open
pkgver=3.6.18
_pkgver=3_6_18 # Upstream's url/dirs ...
pkgrel=1
pkgdesc="An enhancement of the Freespace 2 engine"
url="http://scp.indiegames.us"
arch=('i686' 'x86_64')
license=('custom:fs2_open')
depends=('libjpeg' 'libpng' 'libtheora' 'libvorbis' 'lua51' 'mesa' 'openal' 'sdl')
optdepends=('fs2_open-data: retail game data for Freespace 2'
'fs2_open-mediavps: extensive audiovisual enhancements')
conflicts=('fs2_open_3614')
replaces=('fs2_open_3614')
install=fs2_open.install
source=(http://scp.indiegames.us/builds/fs2_open_${_pkgver}_src.tgz
'osapi_unix.patch'
'increase_joy_buttons_fixed.patch'
'fs2_open'
'options')
md5sums=('22ecfa378fe4098704550219ee8cf7da'
'783d5ab68a0ce4d26ee415e8fefbc762'
'892cee11520d6e258eb17e897f98c1c9'
'07f4ecc84c0267ea631dccf2faebb99d'
'c62e14793f1ad18953ce29776bdbe521')
build()
{
cd "$srcdir/${pkgname}_${_pkgver}"
# Changes default video settings for better mod compatability
patch -Np0 -i "$srcdir/osapi_unix.patch"
# Increases hard limit of joystick buttons for better use with HOTAS etc.
patch -Np0 -i "$srcdir/increase_joy_buttons_fixed.patch"
# Add --enable-debug to make a debug build. These are NOT meant for general play;
# only make a debug build if generating logs/bugreports.
LDFLAGS="-l:liblua.so.5.1 $LDFLAGS" CXXFLAGS="-I/usr/include/lua5.1 $CXXFLAGS" ./autogen.sh --enable-speech
make
}
package()
{
cd "$srcdir/${pkgname}_${_pkgver}"
install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -D -m644 ../options "$pkgdir/usr/share/$pkgname/options"
if [[ -x code/fs2_open_$pkgver ]]; then
install -D -m755 code/fs2_open_$pkgver "$pkgdir/opt/$pkgname/fs2_open_$pkgver"
else
install -D -m755 code/fs2_open_${pkgver}_DEBUG "$pkgdir/opt/$pkgname/fs2_open_${pkgver}_DEBUG"
fi
install -D -m755 "$srcdir/fs2_open" "$pkgdir/usr/bin/fs2_open"
}