desktop/unvanquished/PKGBUILD
Adrian Chaves (Gallaecio) c04250fe2e lua 5.3.3
Packages that do not support latest Lua have been moved to the CCR. If requested,
we could package lua52 and lua51 in the official repoitories to support popular
packages that have not yet caught up with latest Lua.
2016-09-21 23:49:54 +02:00

96 lines
3.5 KiB
Bash

pkgname=unvanquished
pkgver=0.50.0
pkgrel=2
_depbasename=linux64-4
_depname="${_depbasename}.tar.bz2"
_gitver="archlinux/${pkgver}-1"
_gitdir="${pkgname/u/U}-${_gitver/\//-}"
pkgdesc='A team-based, fast-paced, fps/rts hybrid game which pits aliens against humans. Monthly alpha release.'
arch=('x86_64')
url='http://www.unvanquished.net'
license=('GPL3')
depends=("unvanquished-data>=${pkgver}"
'zlib' 'gmp' 'nettle' 'geoip' 'curl' 'sdl2' 'glew' 'libpng'
'libjpeg-turbo' 'libwebp>=0.2.0' 'freetype2' 'openal' 'libogg'
'libvorbis' 'speex' 'libtheora' 'opusfile' 'ncurses' 'xdg-utils'
'desktop-file-utils' 'shared-mime-info' 'hicolor-icon-theme' 'lua')
makedepends=('cmake')
options=('emptydirs' '!strip')
backup=('etc/conf.d/unvanquished.conf' 'etc/unvanquished/server.cfg' 'etc/unvanquished/maprotation.cfg')
install='unvanquished.install'
source=("https://github.com/Unvanquished/Unvanquished/archive/${_gitver}.tar.gz"
'unvanquished.install' "http://dl.unvanquished.net/deps/${_depname}")
sha1sums=('d0fe94e1a5cc2413aa312e2fbe9ee462d878ff20'
'1f6ea4e142cf438a2ae026974546b7e593757bc7'
'faf94dc4a5c6e7b4a1c4a162b4d16f9e3cc31452')
prepare() {
cd "${srcdir}"
ln -sfr "${_depbasename}" -t "${_gitdir}/daemon/external_deps"
}
build() {
cd "${srcdir}/${_gitdir}"
mkdir -p build
cd build
cmake -D BUILD_CGAME=OFF -D BUILD_SGAME=OFF BUILD_GAME_NACL=OFF -D BUILD_GAME_NATIVE_DLL=OFF -D BUILD_GAME_NATIVE_EXE=OFF ..
make
}
package() {
# create installation directories
cd "${pkgdir}"
install -dm755 etc/conf.d \
etc/unvanquished \
usr/bin \
usr/lib/systemd/system \
usr/lib/unvanquished \
usr/share/applications \
usr/share/icons/hicolor/128x128/apps \
usr/share/licenses/unvanquished \
usr/share/unvanquished/pkg \
var/lib/unvanquished-server/config \
var/lib/unvanquished-server/game
# install content
cd "${srcdir}/${_gitdir}"
install -m 644 debian/unvanquished.png "${pkgdir}/usr/share/icons/hicolor/128x128/apps/"
install -m 644 COPYING.txt "${pkgdir}/usr/share/licenses/unvanquished/"
cd "${srcdir}/${_gitdir}/build"
install -m 755 daemon "${pkgdir}/usr/lib/unvanquished/"
install -m 755 daemonded "${pkgdir}/usr/lib/unvanquished/"
install -m 755 daemon-tty "${pkgdir}/usr/lib/unvanquished/"
install -m 755 irt_core-x86*.nexe "${pkgdir}/usr/lib/unvanquished/"
install -m 755 nacl_helper_bootstrap "${pkgdir}/usr/lib/unvanquished/"
install -m 755 nacl_loader "${pkgdir}/usr/lib/unvanquished/"
# install starters and dedicated server config
cd "${srcdir}/${_gitdir}/archlinux"
install -m 755 unvanquished.sh "${pkgdir}/usr/bin/unvanquished"
install -m 755 unvanquished-tty.sh "${pkgdir}/usr/bin/unvanquished-tty"
install -m 644 unvanquished.conf "${pkgdir}/etc/conf.d/"
install -m 644 unvanquished.service "${pkgdir}/usr/lib/systemd/system/"
install -m 644 unvanquished.desktop "${pkgdir}/usr/share/applications/"
install -m 644 configs/maprotation.cfg "${pkgdir}/etc/unvanquished/"
install -m 644 configs/server.cfg "${pkgdir}/etc/unvanquished/"
# setup server home directory
cd "${pkgdir}/var/lib/unvanquished-server/config"
ln -s ../../../../etc/unvanquished/server.cfg .
cd "${pkgdir}/var/lib/unvanquished-server/game"
ln -s ../../../../etc/unvanquished/maprotation.cfg .
}