desktop/xonotic/PKGBUILD

59 lines
2.1 KiB
Bash

#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=xonotic
pkgver=0.1.0
pkgrel=1
pkgdesc="A free, fast-paced crossplatform first-person shooter."
arch=('i686' 'x86_64')
url="http://xonotic.org"
license=('GPL')
depends=('alsa-lib' 'curl' 'libjpeg>=8' 'libmodplug' 'libvorbis' 'libxpm' 'libxxf86dga' 'libxxf86vm' 'sdl' 'libpng>=1.4.0')
makedepends=('unzip' 'mesa')
source=('http://dl.xonotic.org/xonotic-0.1.0preview.zip'
'xonotic-dedicated.sh'
'xonotic-glx.sh'
'xonotic-sdl.sh'
'xonotic-glx.desktop'
'xonotic-sdl.desktop')
md5sums=('aafb43893aa66e01488c817e3a60d96d'
'2c0aef8104fa34aef58d368d994abca3'
'd2f357eab92db585448476470bbf9c1c'
'fdb9b96cd2b700ea9e8a7d6a1ab3505e'
'914c7b9163e92b35f0ab57fdb1653ac5'
'da7d812ff231c9332cd694b39757adda')
build() {
cd $srcdir/Xonotic/source/darkplaces
# build the binaries separately instead 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() {
cd $srcdir/Xonotic
# binaries
install -Dm755 source/darkplaces/nexuiz-dedicated $pkgdir/opt/xonotic/xonotic-dedicated
install -Dm755 source/darkplaces/nexuiz-glx $pkgdir/opt/xonotic/xonotic-glx
install -Dm755 source/darkplaces/nexuiz-sdl $pkgdir/opt/xonotic/xonotic-sdl
# data
mv $srcdir/Xonotic/data $pkgdir/opt/xonotic/
# convenience files
mkdir -p $pkgdir/usr/share/applications
install -Dm644 $srcdir/*.desktop -t $pkgdir/usr/share/applications
install -Dm755 $srcdir/xonotic-dedicated.sh $pkgdir/usr/bin/xonotic-dedicated
install -Dm755 $srcdir/xonotic-glx.sh $pkgdir/usr/bin/xonotic-glx
install -Dm755 $srcdir/xonotic-sdl.sh $pkgdir/usr/bin/xonotic-sdl
install -Dm644 $srcdir/Xonotic/misc/logos/icons_png/xonotic_512.png $pkgdir/usr/share/pixmaps/xonotic.png
}