desktop/xonotic/PKGBUILD
Adrián Chaves Fernández (Gallaecio) 9fcef6af12 Xonotic 0.5.0.
2011-09-09 02:19:12 +00:00

70 lines
2.3 KiB
Bash

#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
pkgbase=xonotic
_pkgbase=Xonotic
pkgname=($pkgbase $pkgbase-data)
pkgver=0.5.0
pkgrel=1
pkgdesc="A free, fast-paced crossplatform first-person shooter"
arch=('i686' 'x86_64')
url="http://xonotic.org"
license=('GPL2')
depends=('alsa-lib' 'curl' 'libjpeg' 'libmodplug' 'libpng' 'libvorbis' 'libxpm' 'libxxf86dga'
'libxxf86vm' 'sdl')
makedepends=('unzip' 'mesa')
source=("http://dl.xonotic.org/$pkgbase-$pkgver.zip"
"xonotic-glx.desktop"
"xonotic-sdl.desktop")
md5sums=('cdadb384ccf9cad926bb377312832c2f'
'449ef5bbabfdac6e85673df13d6983b3'
'677ddb624bea1a8dc9268d6ba6f5cb3b')
build() {
cd $srcdir/$_pkgbase/source/darkplaces
# Build the binaries separately to avoid truncated files.
make CPUOPTIMIZATIONS="$CFLAGS" DP_LINK_TO_LIBJPEG=1 cl-nexuiz
make CPUOPTIMIZATIONS="$CFLAGS" DP_LINK_TO_LIBJPEG=1 sdl-nexuiz
make CPUOPTIMIZATIONS="$CFLAGS" DP_LINK_TO_LIBJPEG=1 sv-nexuiz
}
package_xonotic() {
cd $srcdir/$_pkgbase
depends=('alsa-lib' 'curl' 'libjpeg' 'libmodplug' 'libpng' 'libvorbis' 'libxpm' 'libxxf86dga'
'libxxf86vm' 'sdl' 'xonotic-data')
# Binaries.
install -Dm755 source/darkplaces/nexuiz-dedicated $pkgdir/usr/share/$pkgbase/$pkgbase-server
install -Dm755 source/darkplaces/nexuiz-glx $pkgdir/usr/share/$pkgbase/$pkgbase-glx
install -Dm755 source/darkplaces/nexuiz-sdl $pkgdir/usr/share/$pkgbase/$pkgbase-sdl
# Execution scripts.
install -d $pkgdir/usr/bin
for TYPE in server glx sdl
do
cat > $pkgdir/usr/bin/$pkgbase-$TYPE << EOF
#!/bin/sh
cd /usr/share/$pkgbase
./$pkgbase-$TYPE \$@
EOF
chmod +x $pkgdir/usr/bin/$pkgbase-$TYPE
done
# Desktop integration.
install -Dm644 $srcdir/$pkgbase-glx.desktop $pkgdir/usr/share/applications/$pkgbase-glx.desktop
install -Dm644 $srcdir/$pkgbase-sdl.desktop $pkgdir/usr/share/applications/$pkgbase-sdl.desktop
install -Dm644 $srcdir/$_pkgbase/misc/logos/${pkgbase}_icon.svg $pkgdir/usr/share/pixmaps/$pkgbase.svg
}
package_xonotic-data() {
pkgdesc="A free, fast-paced crossplatform first-person shooter (data files)"
depends=""
arch=(any)
install -d $pkgdir/usr/share/$pkgbase
cp -R $srcdir/$_pkgbase/data $pkgdir/usr/share/$pkgbase/data
}