desktop/redeclipse/PKGBUILD
Adrián Chaves Fernández (Gallaecio) 828c5ac062 Fixed Red Eclipse .desktop file.
2011-08-22 08:46:59 +00:00

62 lines
1.8 KiB
Bash

#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
pkgname=redeclipse
pkgver=1.1
pkgrel=2
pkgdesc='A first-person shooter, built as a total conversion of Cube Engine 2.'
arch=(i686 x86_64)
url=http://redeclipse.net
license=(CCPL-by-sa ZLIB)
depends=(enet libgl mesa sdl sdl_image sdl_mixer zlib)
source=(http://downloads.sourceforge.net/$pkgname/${pkgname}_${pkgver}_linux_bsd.tar.bz2
system-libs.diff
http://imagecdn.maketecheasier.com/2011/04/red-eclipse-logo.png)
md5sums=('e1330a858944e3bdb98fd15e07025d5f'
'f34900e6c8247754800d8fba0600dfb7'
'813971d2496132781ff0f8bf55e0cd2d')
build() {
cd $srcdir/$pkgname/src
# Patches.
patch -uN Makefile $srcdir/system-libs.diff
# Compilation.
make
}
package() {
cd $srcdir/$pkgname
# Game.
install -d $pkgdir/usr/share/$pkgname/bin
install -m755 src/re{server,client} $pkgdir/usr/share/$pkgname/bin/
cp -rf data/ $pkgdir/usr/share/$pkgname
# Execution script.
install -d $pkgdir/usr/bin
echo '#!/bin/sh' > $pkgdir/usr/bin/$pkgname
echo "cd /usr/share/$pkgname" >> $pkgdir/usr/bin/$pkgname
echo 'exec bin/reclient -r "$@"' >> $pkgdir/usr/bin/$pkgname
chmod +x $pkgdir/usr/bin/$pkgname
# Desktop integration file.
sed -i \
-e 's/Version=1\.1/Version=1\.0/' \
-e 's|Icon=redeclipse|Icon=/usr/share/pixmaps/redeclipse|' \
-e 's/a\./a/' \
-e "s#Exec=bin/reclient -r#Exec=$pkgname#" \
-e "/Path=*/d" \
src/install/nix/$pkgname.desktop
install -Dm644 src/install/nix/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
# Icon.
install -Dm644 $srcdir/red-eclipse-logo.png $pkgdir/usr/share/pixmaps/$pkgname.png
# License.
install -Dm644 license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
}