desktop/redeclipse/PKGBUILD

64 lines
1.9 KiB
Bash
Raw Normal View History

#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
pkgname=redeclipse
2012-01-22 19:32:17 +08:00
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)
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)
2012-01-22 19:32:17 +08:00
md5sums=('e133361f79be01782bf0bbc4c5a01236'
'f34900e6c8247754800d8fba0600dfb7'
'813971d2496132781ff0f8bf55e0cd2d')
build() {
cd $srcdir/$pkgname/src
# Patches.
patch -uN Makefile $srcdir/system-libs.diff
# Compilation.
make
}
package() {
2012-01-22 19:32:17 +08:00
cd $srcdir/$pkgname/src
make DESTDIR=$pkgdir install
# Start actual installation.
cd ..
# Game.
install -d $pkgdir/usr/share/$pkgname/bin
2012-01-22 19:32:17 +08:00
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
2012-01-22 19:32:17 +08:00
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 \
2012-01-22 19:32:17 +08:00
-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
}