PKGBUILD 1.48 KB
Newer Older
1 2 3 4 5 6 7 8 9
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer:  Adrian Chaves Fernandez (Gallaecio) <adriyetichaves@gmail.com>
# Contributor: Viech
# Contributor: Martin F. Schumann <mfs@mfs.name>

pkgname=unvanquished
_pkgname=Unvanquished
10
pkgver=0.16.0
11 12 13 14 15 16 17 18 19 20 21
pkgrel=1
pkgdesc="A team-based fps/rts hybrid game which pits aliens against humans"
arch=('x86_64' 'i686')
url="http://www.unvanquished.net"
license=('GPL3')
depends=('curl' 'freetype2' 'glew' 'gmp' 'libjpeg-turbo' 'ncurses' 'libogg' 'libpng' 'sdl' 'libvorbis' 'zlib' 'libwebp>=0.2.0' 'libtheora' 'nettle' 'speex' 'xvidcore' 'openal' 'xdg-utils' 'desktop-file-utils' 'shared-mime-info' 'hicolor-icon-theme' 'unvanquished-data')
makedepends=('git' 'cmake')
provides=('unvanquished')
conflicts=('unvanquished-git')
options=('emptydirs')
source=("https://github.com/${_pkgname}/${_pkgname}/archive/v${pkgver}.tar.gz")
22
md5sums=('b68e498f1eb53b38f73dff572a3e3eba')
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

build() {
    cd ${srcdir}/${_pkgname}-${pkgver}
    
    sed -e "s#$_pkgname#$pkgname#g" -i CMakeLists.txt
    
    mkdir -p build && cd build
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr/share \
        ..
    make
}

package() {
    cd ${srcdir}/${_pkgname}-${pkgver}/build
    make DESTDIR=${pkgdir} install
    
    install -d $pkgdir/usr/bin
    echo "#!/bin/bash"               > $pkgdir/usr/bin/$pkgname
    echo "cd /usr/share/$pkgname"   >> $pkgdir/usr/bin/$pkgname
    echo "./daemon $@"              >> $pkgdir/usr/bin/$pkgname
    chmod +x $pkgdir/usr/bin/$pkgname
}