desktop/unvanquished/PKGBUILD

90 lines
3.3 KiB
Bash
Raw Normal View History

2013-12-05 05:31:20 +08:00
# Maintainer: Viech <viech unvanquished net>
# Contributor: Gereon Schomber
2015-02-13 01:55:14 +08:00
# Contributor: Martin F. Schumann
2012-11-11 12:28:43 +08:00
pkgname=unvanquished
2015-05-01 11:29:15 +08:00
pkgver=0.38.0
2015-02-13 01:55:14 +08:00
pkgrel=1
2015-05-01 11:29:15 +08:00
_depbasename=linux64-3
_depname="${_depbasename}.tar.bz2"
2015-02-13 01:55:14 +08:00
_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.'
2015-05-01 11:29:15 +08:00
arch=('x86_64')
2013-12-05 05:31:20 +08:00
url='http://www.unvanquished.net'
2012-11-11 12:28:43 +08:00
license=('GPL3')
2015-02-13 01:55:14 +08:00
2013-12-05 05:31:20 +08:00
makedepends=('cmake')
2015-02-13 01:55:14 +08:00
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')
options=('emptydirs' '!strip')
backup=('etc/conf.d/unvanquished.conf' 'etc/unvanquished/server.cfg' 'etc/unvanquished/maprotation.cfg')
2013-12-05 05:31:20 +08:00
install='unvanquished.install'
2015-02-13 01:55:14 +08:00
source=("https://github.com/Unvanquished/Unvanquished/archive/${_gitver}.tar.gz"
'unvanquished.install' "https://dl.unvanquished.net/deps/${_depname}")
2012-11-11 12:28:43 +08:00
build() {
2015-02-13 01:55:14 +08:00
cd "${srcdir}/${_gitdir}"
2013-12-05 05:31:20 +08:00
2015-02-13 01:55:14 +08:00
cp -r "${srcdir}/${_depbasename}" external_deps/
cmake -D BUILD_GAME_QVM=OFF -D BUILD_GAME_NACL=OFF -D BUILD_GAME_NACL_NATIVE_DLL=OFF .
2013-12-05 05:31:20 +08:00
make
2012-11-11 12:28:43 +08:00
}
package() {
2013-12-05 05:31:20 +08:00
# create installation directories
2015-02-13 01:55:14 +08:00
cd "${pkgdir}"
2013-12-05 05:31:20 +08:00
2015-02-13 01:55:14 +08:00
install -dm755 etc/conf.d \
etc/unvanquished \
2013-12-05 05:31:20 +08:00
usr/bin \
usr/lib/systemd/system \
2015-02-13 01:55:14 +08:00
usr/lib/unvanquished \
2013-12-05 05:31:20 +08:00
usr/share/applications \
usr/share/icons/hicolor/128x128/apps \
usr/share/licenses/unvanquished \
2015-02-13 01:55:14 +08:00
usr/share/unvanquished/pkg \
var/lib/unvanquished-server/config \
var/lib/unvanquished-server/game
2013-12-05 05:31:20 +08:00
# install content
2015-02-13 01:55:14 +08:00
cd "${srcdir}/${_gitdir}"
2013-12-05 05:31:20 +08:00
2014-11-11 19:10:15 +08:00
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/"
2013-12-05 05:31:20 +08:00
2015-02-13 01:55:14 +08:00
# 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/"
2013-12-05 05:31:20 +08:00
# setup server home directory
2015-02-13 01:55:14 +08:00
cd "${pkgdir}/var/lib/unvanquished-server/config"
ln -s ../../../../etc/unvanquished/server.cfg .
cd "${pkgdir}/var/lib/unvanquished-server/game"
2013-12-05 05:31:20 +08:00
2015-02-13 01:55:14 +08:00
ln -s ../../../../etc/unvanquished/maprotation.cfg .
2012-11-11 12:28:43 +08:00
}
2013-12-05 05:31:20 +08:00
2015-05-01 11:29:15 +08:00
md5sums=('31a4d8b0ac3afb369bdfee868111f396'
'a5246cf3bed53798ddc4d95c6b8c1b37'
'e5a7ee4c6175342b4545cea1c4c669b9')