summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2015-10-13 22:20:45 +0200
committerMichel Zou2015-10-13 22:20:45 +0200
commitb22b6bb23aeffe109b9a8e4d726b2e55009c4ad0 (patch)
tree57da1b5dd29ada1c391f3475408b4f60e364b007
downloadaur-b22b6bb23aeffe109b9a8e4d726b2e55009c4ad0.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD34
-rw-r--r--brainworkshop.desktop8
-rw-r--r--brainworkshop.install19
-rwxr-xr-xbrainworkshop.sh2
5 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..259aa2321728
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = brainworkshop
+ pkgdesc = Brain Workshop is a free open-source version of the Dual N-Back mental exercise
+ pkgver = 4.8.4
+ pkgrel = 4
+ url = http://brainworkshop.sourceforge.net/
+ install = brainworkshop.install
+ arch = any
+ license = GPL
+ depends = python2
+ depends = python2-pyglet
+ depends = avbin7
+ depends = openal
+ source = http://downloads.sourceforge.net/brainworkshop/brainworkshop-4.8.4.zip
+ source = brainworkshop.sh
+ source = brainworkshop.desktop
+ sha256sums = bb1f259eda90e945a803524eedbc0087283e3fb9ae2ab4c16ded88c8c4e95b15
+ sha256sums = 8d27b9055ec21e7b39e91d6b1996573c8ecb2c5fac5ad424be6cd134626ff21f
+ sha256sums = 1e645c18ce0648f82285da25a5bbbad1e63e282bfe9d5c31329eb9d04c23f21c
+
+pkgname = brainworkshop
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f471f651ce98
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Contributor: Keerthan Jaic <jckeerthan at gmail dot com>
+pkgname=brainworkshop
+pkgver=4.8.4
+pkgrel=4
+pkgdesc="Brain Workshop is a free open-source version of the Dual N-Back mental exercise"
+arch=('any')
+url="http://brainworkshop.sourceforge.net/"
+license=('GPL')
+depends=('python2' 'python2-pyglet' 'avbin7' 'openal')
+install='brainworkshop.install'
+source=(http://downloads.sourceforge.net/brainworkshop/$pkgname-$pkgver.zip
+ brainworkshop.sh
+ brainworkshop.desktop)
+sha256sums=('bb1f259eda90e945a803524eedbc0087283e3fb9ae2ab4c16ded88c8c4e95b15'
+ '8d27b9055ec21e7b39e91d6b1996573c8ecb2c5fac5ad424be6cd134626ff21f'
+ '1e645c18ce0648f82285da25a5bbbad1e63e282bfe9d5c31329eb9d04c23f21c')
+
+package() {
+
+ #Data
+ _datadir="${pkgdir}/usr/share/${pkgname}"
+ install -d ${_datadir}
+ cp -a ${srcdir}/${pkgname}/{brainworkshop.pyw,res,data} ${_datadir}
+
+ #Docs
+ _docdir=${pkgdir}/usr/share/doc/${pkgname}
+ install -d "${_docdir}"
+ install -D -m644 "${srcdir}/${pkgname}/Readme.txt" "${_docdir}"
+
+ #Launcher and Icon
+ install -Dm75 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+ install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -D -m644 "${srcdir}/${pkgname}/res/misc/brain/brain.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+}
diff --git a/brainworkshop.desktop b/brainworkshop.desktop
new file mode 100644
index 000000000000..4828cf03a34b
--- /dev/null
+++ b/brainworkshop.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Brain Workshop
+Comment=A free open-source version of the Dual N-Back mental exercise
+Exec=brainworkshop
+Icon=brainworkshop
+Categories=Education
+Terminal=false
+Type=Application
diff --git a/brainworkshop.install b/brainworkshop.install
new file mode 100644
index 000000000000..f0291bf5bedc
--- /dev/null
+++ b/brainworkshop.install
@@ -0,0 +1,19 @@
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ #If updating from 4.8.4-3 or older, inform the user about the changes to
+ #configfile and stats file
+ if [ $(vercmp $2 4.8.4-4) -lt 0 ]; then
+ cat <<EOF
+==> -----------------Brainworkshop Warning-------------------------------
+==> This package no longer uses custom paths for config and stats
+==> The default config file is stored in ~/.brainworkshop/data/config.ini
+==> The default stats file is stored in ~/.brainworkshop/data/stats.txt
+
+==> If you would like to migrate your existing data, run the following commands:
+==> mkdir -p ~/.brainworkshop/data
+==> mv ~/.brainworkshop.ini ~/.brainworkshop/data/config.ini
+==> mv ~/.brainworkshop.stats ~/.brainworkshop/data/stats.txt
+EOF
+ fi
+}
diff --git a/brainworkshop.sh b/brainworkshop.sh
new file mode 100755
index 000000000000..3cf25a6c2acf
--- /dev/null
+++ b/brainworkshop.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+python2 /usr/share/brainworkshop/brainworkshop.pyw