desktop/unvanquished/PKGBUILD

66 lines
2.2 KiB
Bash
Raw Normal View History

2012-11-11 12:28:43 +08:00
#
# 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
2013-11-05 04:10:10 +08:00
pkgver=0.21.0
2013-07-27 02:45:41 +08:00
pkgrel=1
2012-11-11 12:28:43 +08:00
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")
2013-11-05 04:10:10 +08:00
md5sums=('177392c247fb1309e721414727d6c90f')
2012-11-11 12:28:43 +08:00
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
# Executable.
2012-11-11 12:28:43 +08:00
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
# Desktop integration.
cd ${srcdir}/${_pkgname}-${pkgver}/debian
mkdir -p $pkgdir/usr/share/applications
sed -e "s#/usr/games/$pkgname#/usr/bin/$pkgname#" -i $pkgname.desktop
install -m 644 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
mkdir -p $pkgdir/usr/share/pixmaps
install -m 644 $pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
# Translations.
cd ${srcdir}/${_pkgname}-${pkgver}/main
mkdir -p $pkgdir/usr/share/$pkgname/main
cp -R translation $pkgdir/usr/share/$pkgname/main/translation
rm -rf $pkgdir/usr/share/$pkgname/main/translation/*.pot
# Clean unneeded files.
rm -rf $pkgdir/usr/share/$pkgname/main/vm
2012-11-11 12:28:43 +08:00
}