desktop/xonotic/PKGBUILD

67 lines
2.4 KiB
Bash
Raw Normal View History

2011-09-09 10:19:12 +08:00
pkgbase=xonotic
_pkgbase=Xonotic
pkgname=($pkgbase $pkgbase-data)
2015-09-03 10:36:32 +08:00
pkgver=0.8.1
pkgrel=2
2011-09-09 10:19:12 +08:00
pkgdesc="A free, fast-paced crossplatform first-person shooter"
2013-05-29 19:14:17 +08:00
arch=('x86_64')
url="http://xonotic.org"
license=('GPL')
makedepends=('alsa-lib' 'curl' 'libjpeg' 'libmodplug' 'libpng' 'libvorbis' 'libxpm' 'libxxf86dga'
'libxxf86vm' 'sdl2' 'unzip' 'mesa')
2012-03-07 19:00:46 +08:00
categories=('games')
2011-09-09 10:19:12 +08:00
source=("http://dl.xonotic.org/$pkgbase-$pkgver.zip"
"xonotic-glx.desktop"
"xonotic-sdl.desktop")
2015-09-03 10:36:32 +08:00
md5sums=('f7a9cd8ab68a00336acca164f983b569'
2011-09-09 10:35:03 +08:00
'c4d94fcbfbef47cf614f2b6f381ea89b'
'541cf57a483f540220eb08c898f6dbc2')
build() {
2015-02-01 22:19:28 +08:00
# compile engine
make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 cl-release
make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 sdl2-release
make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 sv-release
2015-02-01 22:19:28 +08:00
cd $srcdir/Xonotic/source/d0_blind_id
sh autogen.sh
./configure --prefix=/usr --disable-rijndael
make
}
2011-09-09 10:19:12 +08:00
package_xonotic() {
cd $srcdir/$_pkgbase
depends=('alsa-lib' 'curl' 'libjpeg' 'libmodplug' 'libpng' 'libvorbis' 'libxpm' 'libxxf86dga'
'libxxf86vm' 'sdl2' 'xonotic-data')
2011-09-09 10:19:12 +08:00
# Binaries.
2015-02-01 22:19:28 +08:00
install -Dm755 source/darkplaces/darkplaces-dedicated $pkgdir/usr/share/$pkgbase/$pkgbase-server
install -Dm755 source/darkplaces/darkplaces-glx $pkgdir/usr/share/$pkgbase/$pkgbase-glx
install -Dm755 source/darkplaces/darkplaces-sdl $pkgdir/usr/share/$pkgbase/$pkgbase-sdl
2011-09-09 10:19:12 +08:00
# 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
}
2011-09-09 10:19:12 +08:00
package_xonotic-data() {
pkgdesc="A free, fast-paced crossplatform first-person shooter (data files)"
2013-05-29 19:14:17 +08:00
arch=('x86_64')
2011-09-09 10:19:12 +08:00
install -d $pkgdir/usr/share/$pkgbase
cp -R $srcdir/$_pkgbase/data $pkgdir/usr/share/$pkgbase/data
}