summaryrefslogtreecommitdiff
path: root/community/btanks
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/btanks
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/btanks')
-rw-r--r--community/btanks/PKGBUILD62
-rw-r--r--community/btanks/btanks.install36
-rw-r--r--community/btanks/btanks_desktop10
-rw-r--r--community/btanks/btanks_script6
-rw-r--r--community/btanks/bted_script6
5 files changed, 120 insertions, 0 deletions
diff --git a/community/btanks/PKGBUILD b/community/btanks/PKGBUILD
new file mode 100644
index 000000000..1cb857a22
--- /dev/null
+++ b/community/btanks/PKGBUILD
@@ -0,0 +1,62 @@
+# Contributor: Nick B <Shirakawasuna at gmail _dot_ com>
+pkgname=btanks
+pkgver=0.9.8083
+pkgrel=1
+pkgdesc="Fast 2d tank arcade game with multiplayer and split-screen modes."
+arch=('i686' 'x86_64')
+url="http://btanks.sourceforge.net"
+license=('GPL')
+depends=('expat' 'libgl' 'libsigc++2.0' 'libvorbis' 'lua' 'openal' 'sdl' 'sdl_image' 'smpeg' 'btanks-data')
+makedepends=('scons' 'chrpath')
+source=(http://downloads.sourceforge.net/btanks/btanks-$pkgver.tar.bz2
+ btanks_desktop
+ btanks_script
+ bted_script)
+install=btanks.install
+md5sums=('49cb95c0eec47d3436c4fdf65e7c9d12'
+ 'a2ddeb1e79dff8d3fd702984c8d3aab5'
+ '07657cfa71b1de1d008cc5e3ade9749b'
+ '91a61c0f581ea27281bdaecb7a3cd58b')
+
+build() {
+ # Compile with scons
+ cd $srcdir/$pkgname-$pkgver
+ scons || return 1
+
+ mkdir -p $pkgdir/usr/share/btanks
+ cp *.so btanks bted $pkgdir/usr/share/btanks/ || return 1
+
+ # Install script
+ install -D -m755 $srcdir/bted_script $pkgdir/usr/bin/bted && \
+ install -D -m755 $srcdir/btanks_script $pkgdir/usr/bin/btanks || return 1
+
+ # Install desktop file
+ install -D -m644 $srcdir/btanks_desktop $pkgdir/usr/share/applications/btanks.desktop || return 1
+
+ # Install icon
+ install -D -m644 $srcdir/$pkgname-$pkgver/data/tiles/icon.png $pkgdir/usr/share/pixmaps/btanks.png || return 1
+
+ # Make settings saveable
+ touch $pkgdir/usr/share/btanks/bt.xml
+ chown :games $pkgdir/usr/share/btanks/bt.xml
+ chmod 664 $pkgdir/usr/share/btanks/bt.xml
+
+ # move executables, fix rpath
+ cd $pkgdir/usr/share/btanks
+ mkdir -p $pkgdir/usr/bin $pkgdir/usr/lib/btanks
+
+ mv btanks $pkgdir/usr/bin/btanks-bin && \
+ mv bted $pkgdir/usr/bin/bted-bin && \
+ mv *.so $pkgdir/usr/lib/btanks/ || return 1
+
+ ln -s /usr/bin/btanks-bin ./btanks && \
+ ln -s /usr/bin/bted-bin ./bted || return 1
+
+ ls -1 $pkgdir/usr/lib/btanks/ | while read A; do
+ ln -s /usr/lib/btanks/$A ./$A || return 1
+ done
+
+ chrpath -d $pkgdir/usr/bin/bted-bin && \
+ chrpath -d $pkgdir/usr/bin/btanks-bin && \
+ chrpath -d $pkgdir/usr/lib/btanks/*.so
+}
diff --git a/community/btanks/btanks.install b/community/btanks/btanks.install
new file mode 100644
index 000000000..b05ede359
--- /dev/null
+++ b/community/btanks/btanks.install
@@ -0,0 +1,36 @@
+# This is a default template for a post-install scriptlet. You can
+# remove any functions you don't need (and this header).
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ /bin/echo "In order to be able to change game preferences, you must be in the 'games' group."
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/echo "In order to be able to change game preferences, you must be in the 'games' group."
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/btanks/btanks_desktop b/community/btanks/btanks_desktop
new file mode 100644
index 000000000..548fa7bfe
--- /dev/null
+++ b/community/btanks/btanks_desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Battle Tanks!
+Comment= A 2D arcade tank battle!
+Icon=btanks
+Exec=btanks
+Terminal=false
+StartupNotify=false
+Categories=Game;ArcadeGame;
diff --git a/community/btanks/btanks_script b/community/btanks/btanks_script
new file mode 100644
index 000000000..86ad105ef
--- /dev/null
+++ b/community/btanks/btanks_script
@@ -0,0 +1,6 @@
+#!/bin/bash
+#This is the script for running the actual btanks executable
+
+cd /usr/share/btanks/
+export LD_LIBRARY_PATH=/usr/lib/btanks
+exec ./btanks
diff --git a/community/btanks/bted_script b/community/btanks/bted_script
new file mode 100644
index 000000000..69ba70309
--- /dev/null
+++ b/community/btanks/bted_script
@@ -0,0 +1,6 @@
+#!/bin/bash
+#This is the script for running the actual bted executable
+
+cd /usr/share/btanks/
+export LD_LIBRARY_PATH=/usr/lib/btanks
+exec ./bted