summaryrefslogtreecommitdiff
path: root/community/megaglest
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/megaglest
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/megaglest')
-rw-r--r--community/megaglest/PKGBUILD55
-rw-r--r--community/megaglest/megaglest.desktop8
-rw-r--r--community/megaglest/megaglest.pngbin0 -> 8274 bytes
-rw-r--r--community/megaglest/megaglest.sh26
4 files changed, 89 insertions, 0 deletions
diff --git a/community/megaglest/PKGBUILD b/community/megaglest/PKGBUILD
new file mode 100644
index 000000000..abc4db3b9
--- /dev/null
+++ b/community/megaglest/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 38887 2011-02-02 21:51:51Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>
+
+pkgname=megaglest
+pkgver=3.4.0
+pkgrel=1
+pkgdesc="Fork of Glest, a 3D real-time strategy game in a fantastic world."
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/megaglest/"
+license=('GPL2')
+depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'mesa' 'lua')
+makedepends=('ftjam' 'p7zip' 'wxgtk' 'cmake')
+source=("http://downloads.sourceforge.net/project/${pkgname}/current_release/${pkgname}-source-${pkgver}.tar.bz2"
+ "http://downloads.sourceforge.net/project/${pkgname}/current_release/megaglest-data-${pkgver}.7z"
+ "megaglest.png"
+ "megaglest.desktop"
+ "megaglest.sh")
+md5sums=('904846c60369f7898c7f83d506624d5a'
+ 'e46270881f1949e0876f4c39ecbf0a05'
+ '5622ce716033d9afb62a3291b47844ed'
+ '97dc7ea865efbea5daaf300207dad518'
+ 'e3d6abbe79263d2fa5edb0bcbcf8755a')
+
+build() {
+ cd ${srcdir}/${pkgname}-source-${pkgver}/
+
+ 7z x -y ${srcdir}/megaglest-data-${pkgver}.7z
+
+ [[ -d build ]] && rm -r build
+ mkdir build && cd build
+ cmake .. \
+ -DWANT_SVN_STAMP=OFF \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-source-${pkgver}/
+
+ # Megaglest doesn't have a nice installer. Let's package it ourselves.
+ # Damnit, upstream.
+ install -d -m 0755 "${pkgdir}"/usr/{bin,share/${pkgname}}
+ install -m 0755 "${srcdir}"/$pkgname.sh "${pkgdir}"/usr/bin/$pkgname
+ install -m 0755 mk/linux/glest.bin "${pkgdir}"/usr/share/${pkgname}/$pkgname
+ install -m 0755 mk/linux/glest_configurator "${pkgdir}"/usr/bin/glest_configurator
+ install -m 0755 mk/linux/glest_editor "${pkgdir}"/usr/bin/glest_editor
+ install -m 0644 glest.ini glestkeys.ini servers.ini "${pkgdir}"/usr/share/$pkgname
+
+ install -D -m 0644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
+ install -D -m 0644 "${srcdir}"/${pkgname}.png "${pkgdir}"/usr/share/pixmaps/${pkgname}.png
+}
+
+# vim: sw=2:ts=2 et:
diff --git a/community/megaglest/megaglest.desktop b/community/megaglest/megaglest.desktop
new file mode 100644
index 000000000..267dbf358
--- /dev/null
+++ b/community/megaglest/megaglest.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+Categories=Application;Game;
+Name=Megaglest
+Icon=megaglest
+Exec=megaglest
+Terminal=false
+Type=Application
diff --git a/community/megaglest/megaglest.png b/community/megaglest/megaglest.png
new file mode 100644
index 000000000..65e5d9862
--- /dev/null
+++ b/community/megaglest/megaglest.png
Binary files differ
diff --git a/community/megaglest/megaglest.sh b/community/megaglest/megaglest.sh
new file mode 100644
index 000000000..571a01be7
--- /dev/null
+++ b/community/megaglest/megaglest.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+ # Wrapper script for Megaglest.
+
+ MAINDIR=/usr/share/megaglest
+ BASEDIR="$HOME/.config"
+ DIR="$BASEDIR/megaglest"
+ if [ ! -d "$DIR" ]; then
+ mkdir -p $DIR
+ fi
+ cd $DIR
+ [ -f glest.ini ] || cp /usr/share/megaglest/glest.ini .
+ [ -h megaglest ] || ln -s /usr/share/megaglest/megaglest .
+ [ -f servers.ini ] || cp $MAINDIR/servers.ini .
+ [ -f glestkeys.ini ] || cp $MAINDIR/glestkeys.ini .
+ for i in data scenarios techs tilesets tutorials; do
+ [ -h $i ] || ln -s $MAINDIR/$i .
+ done
+ [ -d maps ] || mkdir maps
+ [ -d screens ] || mkdir screens
+ cd maps
+ for i in $MAINDIR/maps/*; do
+ [ -h `basename $i` ] || ln -s $i .
+ done
+ cd ..
+
+ exec ./megaglest \ No newline at end of file