summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Bernigaud2015-06-08 20:51:18 +0200
committerCôme Bernigaud2015-06-08 20:51:18 +0200
commit5b192358e3e62839af9a971991e6c2fd36eed23a (patch)
treeff338e65128eef515c347597f23acf061e6c48da
downloadaur-purity.tar.gz
Initial import
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD66
-rwxr-xr-xpurity-zen13
3 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..cc0d9490dfa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = purity
+ pkgdesc = An abstract first-person shooter built on the Quake3 engine.
+ pkgver = 20071027
+ pkgrel = 6
+ url = http://vectorpoem.com/purity/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = make
+ makedepends = svn
+ optdepends = zenity: allow using purity-zen to choose graphically the map
+ noextract = core.pk3
+ noextract = map0.pk3
+ noextract = vm.pk3
+ source = http://vectorpoem.com/purity/latest_content/core.pk3
+ source = http://vectorpoem.com/purity/latest_content/map0.pk3
+ source = http://vectorpoem.com/purity/latest_content/vm.pk3
+ source = purity-zen
+ md5sums = 4f5b6af36a738a54570f21fb24177edd
+ md5sums = b7f5730e443ea5c066d7ef67bce09892
+ md5sums = 8396c0dfe49c31ff866800837bf80d9d
+ md5sums = 8361d4586bf2c0dd1a31edddf8b70d89
+
+pkgname = purity
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f1eb80ed84f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,66 @@
+# Contributor: MCMic <come.bernigaud@laposte.net>
+
+pkgname=purity
+pkgver=20071027
+pkgrel=6
+pkgdesc="An abstract first-person shooter built on the Quake3 engine."
+arch=('i686' 'x86_64')
+url="http://vectorpoem.com/purity/"
+license=('GPL')
+depends=()
+makedepends=('make' 'svn')
+optdepends=('zenity: allow using purity-zen to choose graphically the map')
+conflicts=('')
+source=('http://vectorpoem.com/purity/latest_content/core.pk3'
+ 'http://vectorpoem.com/purity/latest_content/map0.pk3'
+ 'http://vectorpoem.com/purity/latest_content/vm.pk3'
+ 'purity-zen')
+noextract=( 'core.pk3'
+ 'map0.pk3'
+ 'vm.pk3')
+md5sums=('4f5b6af36a738a54570f21fb24177edd'
+ 'b7f5730e443ea5c066d7ef67bce09892'
+ '8396c0dfe49c31ff866800837bf80d9d'
+ '8361d4586bf2c0dd1a31edddf8b70d89')
+
+_svn='https://purityq3.svn.sourceforge.net/svnroot/purityq3'
+
+build() {
+ cd $srcdir
+ msg "Getting svn revision…"
+ if [ -d $pkgname/.svn ]; then
+ (cd $pkgname && svn up)
+ else
+ svn co $_svn $pkgname
+ fi
+
+ msg "Building…"
+ cd $pkgname
+ make
+
+ msg "Cleaning and adapting scripts"
+ build_folder=`ls ${srcdir}/$pkgname/build`
+ bin_name=`ls ${srcdir}/$pkgname/build/$build_folder | grep "purity\."`
+ bin_serv=`ls ${srcdir}/$pkgname/build/$build_folder | grep "purity-ded"`
+ bin_path=/opt/$pkgname/build/$build_folder/$bin_name
+ serv_path=/opt/$pkgname/build/$build_folder/$bin_serv
+ _bin=`echo $bin_path | sed "s|\/|\\\/|g"`
+ _serv=`echo $serv_path | sed "s|\/|\\\/|g"`
+ rm *.exe
+ for i in `ls *.bat | cut -d'.' -f1`
+ do sed -i "s|@start purity.x86|$_bin|" $i.bat
+ sed -i "s|@start purity-ded.x86|$_serv|" $i.bat
+ mv $i.bat $i.sh
+ chmod +x $i.sh
+ done
+
+ sed -i "s|purity_cmd|$_bin|" ${srcdir}/purity-zen
+
+ msg "Packaging"
+ mkdir -p ${pkgdir}/usr/bin
+ cp ${srcdir}/$pkgname/purity.sh ${pkgdir}/usr/bin/
+ cp ${srcdir}/purity-zen ${pkgdir}/usr/bin/
+ mkdir -p ${pkgdir}/opt/$pkgname/build/$build_folder/base
+ cp -r ${srcdir}/$pkgname ${pkgdir}/opt/
+ cp ${srcdir}/*.pk3 ${pkgdir}/opt/$pkgname/build/$build_folder/base/
+}
diff --git a/purity-zen b/purity-zen
new file mode 100755
index 00000000000..8ec1a8ce192
--- /dev/null
+++ b/purity-zen
@@ -0,0 +1,13 @@
+#!/bin/sh
+map=`(echo -e "tut1\nrun1\nrun2" && ls ~/.purity/base/maps/ 2>/dev/null | grep "\.bsp" | egrep -o '.+[^\.bsp]') | zenity --list --text="Choose the map you wanna launch" --column="Map"`
+
+case $map in
+"")
+ ;;
+tut1)
+ purity_cmd -nointro +sv_pure 0 +g_gametype 5 +map $map
+ ;;
+*)
+ purity_cmd -nointro +sv_pure 0 +g_gametype 3 +map $map
+ ;;
+esac