summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Straube2016-02-07 20:13:55 +0100
committerMichael Straube2016-02-07 20:13:55 +0100
commitf1d503cb9f0baf905b17a66d7077097d67a4d74a (patch)
tree6363ed50b9e00f5060c6587d9369b877504e448a
downloadaur-f1d503cb9f0baf905b17a66d7077097d67a4d74a.tar.gz
Initial Import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD36
-rw-r--r--fix-savepath.patch18
-rw-r--r--floodit.desktop9
4 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..78f0d577aad5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Sun Feb 7 19:13:32 UTC 2016
+pkgbase = floodit
+ pkgdesc = A flood it clone written in python
+ pkgver = 0.1.1
+ pkgrel = 1
+ url = https://github.com/metulburr/FloodIt
+ arch = any
+ license = unknown
+ depends = python2-pygame
+ source = https://github.com/metulburr/FloodIt/archive/0.1.1.tar.gz
+ source = fix-savepath.patch
+ source = floodit.desktop
+ md5sums = 844d6f87d207c855a11238325f7c9ee2
+ md5sums = 0be51f3fd9ff3f667f46d7bd6a649802
+ md5sums = b310a9d674c95357dadc10ee290a4dd0
+
+pkgname = floodit
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..59f955154655
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Michael Straube <m.s.online gmx.de>
+
+pkgname=floodit
+pkgver=0.1.1
+pkgrel=1
+pkgdesc='A flood it clone written in python'
+arch=('any')
+license=('unknown')
+url='https://github.com/metulburr/FloodIt'
+depends=('python2-pygame')
+source=("https://github.com/metulburr/FloodIt/archive/${pkgver}.tar.gz"
+ "fix-savepath.patch"
+ "floodit.desktop")
+md5sums=('844d6f87d207c855a11238325f7c9ee2'
+ '0be51f3fd9ff3f667f46d7bd6a649802'
+ 'b310a9d674c95357dadc10ee290a4dd0')
+
+prepare() {
+ cd "${srcdir}/FloodIt-${pkgver}"
+ sed -i 's/python/python2/' game.py
+ patch -p0 < ../fix-savepath.patch
+}
+
+package() {
+ cd "${srcdir}/FloodIt-${pkgver}"
+ mkdir -p "${pkgdir}"/usr/{bin,share/games/floodit}
+ cp -r data resources game.py "${pkgdir}/usr/share/games/floodit/"
+
+ echo -e "#!/bin/bash\ncd /usr/share/games/floodit\n./game.py" \
+ > "${pkgdir}/usr/bin/floodit"
+
+ chmod 755 "${pkgdir}/usr/bin/floodit"
+
+ install -Dm644 ../floodit.desktop \
+ "${pkgdir}/usr/share/applications/floodit.desktop"
+}
diff --git a/fix-savepath.patch b/fix-savepath.patch
new file mode 100644
index 000000000000..9e48ecaa2497
--- /dev/null
+++ b/fix-savepath.patch
@@ -0,0 +1,18 @@
+--- data/tools.py.orig 2016-02-07 20:09:59.949254368 +0100
++++ data/tools.py 2016-02-07 20:10:30.811842082 +0100
+@@ -6,9 +6,13 @@
+ import random
+ import sys
+ import json
+-
++
+ class DB:
+- dirname = 'save'
++ # patched to save the DB in $HOME/.floodit
++ savedir = os.path.join(os.path.expanduser('~'), '.floodit')
++ if not os.path.exists(savedir):
++ os.mkdir(savedir)
++ dirname = os.path.join(savedir, 'save')
+ if not os.path.exists(dirname):
+ os.mkdir(dirname)
+ path = os.path.join(dirname, 'database{}'.format(sys.version.split()[0]))
diff --git a/floodit.desktop b/floodit.desktop
new file mode 100644
index 000000000000..3c4fc4ab3808
--- /dev/null
+++ b/floodit.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Flood It
+Comment=A Flood It clone
+Exec=floodit
+Terminal=false
+Type=Application
+Categories=Application;Game;LogicGame
+Icon=/usr/lib/python2.7/site-packages/pygame/pygame_icon.svg