# # Games Packages for Chakra, part of chakra-project.org # # Maintainer: Adrián Chaves Fernández (Gallaecio) pkgname=redeclipse pkgver=1.2 pkgrel=1 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) categories=('games') 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=('e133361f79be01782bf0bbc4c5a01236' 'f34900e6c8247754800d8fba0600dfb7' '813971d2496132781ff0f8bf55e0cd2d') build() { cd $srcdir/$pkgname/src # Patches. patch -uN Makefile $srcdir/system-libs.diff # Compilation. make } package() { cd $srcdir/$pkgname/src make DESTDIR=$pkgdir install # Start actual installation. cd .. # Game. install -d $pkgdir/usr/share/$pkgname/bin install -Dm755 bin/reserver_native $pkgdir/usr/share/$pkgname/bin/reserver_native install -Dm755 bin/reclient_native $pkgdir/usr/share/$pkgname/bin/reclient_native 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_native -r "$@"' >> $pkgdir/usr/bin/$pkgname chmod +x $pkgdir/usr/bin/$pkgname # Desktop integration file. sed -i \ -e 's#Icon=@REDECLIPSE@#Icon=/usr/share/pixmaps/redeclipse#' \ -e "s#Exec=@REDECLIPSE@#Exec=$pkgname#" \ src/install/nix/$pkgname.desktop.am install -Dm644 src/install/nix/$pkgname.desktop.am $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 }