pkgname=unvanquished pkgver=0.39.0 pkgrel=1 _depbasename=linux64-3 _depname="${_depbasename}.tar.bz2" _gitver="archlinux/${pkgver}-${pkgrel}" _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') 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' "https://dl.unvanquished.net/deps/${_depname}") md5sums=('a25109dafdd7eee08c68fc2ef2787bce' 'a5246cf3bed53798ddc4d95c6b8c1b37' '9f73b3b0b4536b022be5d3e218b48ea1') build() { cd "${srcdir}/${_gitdir}" cp -r "${srcdir}/${_depbasename}" external_deps/ cmake -D BUILD_GAME_NATIVE_EXE=OFF -D BUILD_GAME_NACL=OFF -D BUILD_GAME_NACL_NATIVE_DLL=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 755 daemon* "${pkgdir}/usr/lib/unvanquished/" install -m 755 *.so "${pkgdir}/usr/lib/unvanquished/" install -m 755 nacl_helper_bootstrap "${pkgdir}/usr/lib/unvanquished/" install -m 755 irt_core-x86*.nexe "${pkgdir}/usr/lib/unvanquished/" install -m 644 debian/unvanquished.png "${pkgdir}/usr/share/icons/hicolor/128x128/apps/" install -m 644 COPYING.txt "${pkgdir}/usr/share/licenses/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 . }