summaryrefslogtreecommitdiff
path: root/community/teeworlds
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/teeworlds
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/teeworlds')
-rw-r--r--community/teeworlds/PKGBUILD65
-rw-r--r--community/teeworlds/fix_datadir_search.patch36
-rw-r--r--community/teeworlds/teeworlds.desktop14
-rw-r--r--community/teeworlds/teeworlds.pngbin0 -> 1701 bytes
4 files changed, 115 insertions, 0 deletions
diff --git a/community/teeworlds/PKGBUILD b/community/teeworlds/PKGBUILD
new file mode 100644
index 000000000..12e6720c4
--- /dev/null
+++ b/community/teeworlds/PKGBUILD
@@ -0,0 +1,65 @@
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Armin 'IsSuE' Praher [issue.at.gmx.dot.at]
+# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=teeworlds
+pkgver=0.5.2
+_bamver=0.2.0
+pkgrel=2
+pkgdesc="A multiplayer 2D shooter"
+arch=('i686' 'x86_64')
+url="http://teeworlds.com"
+license=('custom')
+depends=('alsa-lib' 'mesa' 'sdl')
+makedepends=('python2')
+replaces=('teewars')
+source=(http://www.teeworlds.com/files/${pkgname}-${pkgver}-src.tar.gz
+ http://www.teeworlds.com/files/bam-${_bamver}.tar.gz
+ teeworlds.desktop
+ teeworlds.png
+ fix_datadir_search.patch)
+md5sums=('f605f6df9f1714dcda4cba1d281cc757'
+ 'd4efe74591a73c1cec8b34d76ffd1049'
+ '3944aaf7a8c19a83510b2b39c4cddf5f'
+ '44f39e398409232a0e0a431ed46d8cc8'
+ '673791ecb74274346456f0fae53b4428')
+
+build() {
+ # Build bam (used to build teewars)
+ # Now it is released separately I should make a separate package...
+ cd ${srcdir}/bam-${_bamver}
+ ./make_unix.sh
+
+ # Build teeworlds
+ cd ${srcdir}/${pkgname}-${pkgver}-src
+
+ # fix for FS 13118 which will be applied in next release
+ patch -p1 -i ../fix_datadir_search.patch
+
+ # Use Python 2
+ sed -i 's/python /python2 /' default.bam
+
+ ../bam-${_bamver}/src/bam server_release client_release
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}-src
+
+ # Install data files
+ mkdir -p ${pkgdir}/usr/share/${pkgname}/data
+ cp -r ${srcdir}/${pkgname}-${pkgver}-src/data/* \
+ ${pkgdir}/usr/share/${pkgname}/data
+
+ install -Dm755 ${srcdir}/${pkgname}-${pkgver}-src/${pkgname} \
+ ${pkgdir}/usr/bin/${pkgname}
+ install -Dm755 ${srcdir}/${pkgname}-${pkgver}-src/${pkgname}_srv \
+ ${pkgdir}/usr/bin/${pkgname}_srv
+
+ install -Dm644 ${srcdir}/${pkgname}.desktop \
+ ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ install -Dm644 ${srcdir}/${pkgname}.png \
+ ${pkgdir}/usr/share/pixmaps/${pkgname}.png
+ install -Dm644 ${srcdir}/${pkgname}-${pkgver}-src/license.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/license.txt
+}
diff --git a/community/teeworlds/fix_datadir_search.patch b/community/teeworlds/fix_datadir_search.patch
new file mode 100644
index 000000000..19a4ae1e5
--- /dev/null
+++ b/community/teeworlds/fix_datadir_search.patch
@@ -0,0 +1,36 @@
+diff -r 9582fcee983b -r c1502459a920 src/engine/e_engine.c
+--- a/src/engine/e_engine.c Sun Feb 01 20:50:22 2009 +0100
++++ b/src/engine/e_engine.c Sun Feb 01 21:37:17 2009 +0100
+@@ -539,14 +539,15 @@
+ }
+
+ /* 2) use data-dir in PWD if present */
+- if(fs_is_dir("data"))
++ /* test subdir "/mapres" to reject unrelated "data" dir in PWD */
++ if(fs_is_dir("data/mapres"))
+ {
+ strcpy(datadir, "data");
+ return 0;
+ }
+
+ /* 3) use compiled-in data-dir if present */
+- if (fs_is_dir(DATA_DIR))
++ if (fs_is_dir(DATA_DIR "/mapres"))
+ {
+ strcpy(datadir, DATA_DIR);
+ return 0;
+@@ -572,9 +573,11 @@
+ /* 5) check for all default locations */
+ {
+ const char *sdirs[] = {
+- "/usr/share/teeworlds",
+- "/usr/local/share/teeworlds"
+- "/opt/teeworlds"
++ "/usr/share/teeworlds/data",
++ "/usr/share/games/teeworlds/data",
++ "/usr/local/share/teeworlds/data",
++ "/usr/local/share/games/teeworlds/data",
++ "/opt/teeworlds/data"
+ };
+ const int sdirs_count = sizeof(sdirs) / sizeof(sdirs[0]);
+
diff --git a/community/teeworlds/teeworlds.desktop b/community/teeworlds/teeworlds.desktop
new file mode 100644
index 000000000..ddfb8994d
--- /dev/null
+++ b/community/teeworlds/teeworlds.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Icon=teeworlds
+Exec=teeworlds
+Terminal=false
+StartupNotify=false
+
+Name=TeeWorlds
+GenericName=Arcade Game
+Comment=is a multiplayer 2D FPS shooter
+Comment[pl_PL]=wieloosobowa strzelanka FTP w 2D
+
+Categories=Game;ArcadeGame;
diff --git a/community/teeworlds/teeworlds.png b/community/teeworlds/teeworlds.png
new file mode 100644
index 000000000..890baaff3
--- /dev/null
+++ b/community/teeworlds/teeworlds.png
Binary files differ