warsow: update to 2.1.

Closes #4097
This commit is contained in:
Michael Gehring 2016-04-29 10:28:29 +02:00 committed by Juan RP
parent 37ed3dbb24
commit 33f402d984

View file

@ -1,42 +1,45 @@
# Template file for 'warsow'
pkgname=warsow
version=1.51
revision=3
create_wrksrc=yes
version=2.1
revision=1
build_style=cmake
configure_args="-DQFUSION_GAME=Warsow"
wrksrc="warsow_${version/./}_sdk"
build_wrksrc="source/source"
hostmakedepends="pkg-config"
makedepends="libcurl-devel libvorbis-devel libtheora-devel
libjpeg-turbo-devel libpng-devel SDL-devel libopenal-devel MesaLib-devel
libXext-devel libXinerama-devel libXrandr-devel libXxf86vm-devel libXi-devel
libXxf86dga-devel fontconfig-devel"
makedepends="libcurl-devel libvorbis-devel libtheora-devel libjpeg-turbo-devel
libopenal-devel MesaLib-devel libXi-devel libXxf86dga-devel
fontconfig-devel SDL2-devel"
# libopenal is dlopen(3)ed at runtime.
depends="desktop-file-utils warsow-data>=1.5 libopenal"
depends="desktop-file-utils warsow-data>=2.1 libopenal"
short_desc="Free online multiplayer competitive FPS based on the Qfusion engine"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://www.warsow.net/"
distfiles="http://update.warsow.net/mirror/warsow_${version}_sdk.tar.gz"
checksum=ac635c654e088566d30d53e8fab21abd2d40762d7f4ab0e09faa827aac5c4f97
distfiles="http://mirror.null.one/warsow_${version/./}_sdk.tar.gz"
checksum=99c88bc08f5e6055d28534de6e84fc204026dda51dc31e22caca1977f199453a
post_extract() {
if [ "$XBPS_TARGET_MACHINE" != "i686" -a "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
sed -i 's/-msse2//' source/source/Makefile
if [ "$XBPS_TARGET_MACHINE" != "i686" -a "$XBPS_TARGET_MACHINE" != "x86_64" ]; then
sed -i 's/-msse2//' source/source/CMakeLists.txt
fi
}
do_build() {
cd source/source
make ${makejobs}
}
do_install() {
# Move Compiled Data to Destination Directory
vmkdir usr/share/warsow
vcopy "source/source/release/*" usr/share/warsow
chmod 755 ${DESTDIR}/usr/share/warsow/warsow
find ${DESTDIR}/usr/share/warsow -type d | xargs chmod 755
find ${DESTDIR}/usr/share/warsow -type f | xargs chmod 755 # only executable files in there
case "$XBPS_TARGET_MACHINE" in
x86_64*) _arch=x86_64 ;;
i686*) _arch=i686 ;;
# arm*) _arch=arm ;; # XXX
esac
vinstall "build/warsow.$_arch" 0755 /usr/share/warsow warsow
vinstall "build/wsw_server.$_arch" 0755 /usr/share/warsow wsw_server
vinstall "build/wswtv_server.$_arch" 0755 /usr/share/warsow wswtv_server
vcopy "build/basewsw" usr/share/warsow
vcopy "build/libs" usr/share/warsow
vbin ${FILESDIR}/warsow.launcher warsow
vbin ${FILESDIR}/wsw-server.launcher wsw-server