summaryrefslogtreecommitdiff
path: root/staging/pathological
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-02 01:06:16 -0700
committerroot <root@rshg054.dnsready.net>2012-10-02 01:06:16 -0700
commit941550cbc215d608bd18439f99500b74fbb80f0d (patch)
treeced50aee5db693d8495b19c59d2bdbd6927c9393 /staging/pathological
parent9b6be78b0c13a61c14d5278f1363eaf9c6388e4c (diff)
Tue Oct 2 01:06:06 PDT 2012
Diffstat (limited to 'staging/pathological')
-rw-r--r--staging/pathological/PKGBUILD38
-rw-r--r--staging/pathological/encoding.patch8
-rw-r--r--staging/pathological/pathological.desktop9
-rw-r--r--staging/pathological/pathological.install29
-rw-r--r--staging/pathological/pygame_181.patch10
5 files changed, 94 insertions, 0 deletions
diff --git a/staging/pathological/PKGBUILD b/staging/pathological/PKGBUILD
new file mode 100644
index 000000000..acf263add
--- /dev/null
+++ b/staging/pathological/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 167400 2012-10-01 23:04:53Z eric $
+# Maintainer: Eric BĂ©langer <eric@archlinux.org>
+
+pkgname=pathological
+pkgver=1.1.3
+pkgrel=8
+pkgdesc="A puzzle game with the same feel as frozen bubble"
+arch=('i686' 'x86_64')
+url="http://pathological.sourceforge.net/"
+license=('GPL')
+depends=('python2-pygame')
+makedepends=('netpbm')
+install=pathological.install
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ pathological.desktop pygame_181.patch encoding.patch)
+sha1sums=('70b1c9e12704c7fd3b301aa90bceee2e8373b7b9'
+ '9b57f854ce9621542d810a21c61325de343950d7'
+ '6f0aa0f74a87bd53771f2db6d3117981c4f070d3'
+ '7dbaa9ced7da0094280425a68b4c8db3382f230a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 < ../encoding.patch
+ patch -p1 < ../pygame_181.patch
+ sed -i 's|X11R6/include/X11|share|' Makefile
+ sed -i 's|usr/games|usr/bin|' Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' "${pkgdir}/usr/share/games/pathological/pathological.py"
+ install -D -m644 ../pathological.desktop "${pkgdir}/usr/share/applications/pathological.desktop"
+ chown root:games "${pkgdir}/var/games"
+ chmod 775 "${pkgdir}/var/games"
+ rm "${pkgdir}/var/games/pathological_scores"
+}
diff --git a/staging/pathological/encoding.patch b/staging/pathological/encoding.patch
new file mode 100644
index 000000000..394875809
--- /dev/null
+++ b/staging/pathological/encoding.patch
@@ -0,0 +1,8 @@
+--- pathological.py.orig 2009-07-10 01:49:39.000000000 -0400
++++ pathological.py 2009-07-10 01:49:53.000000000 -0400
+@@ -1,4 +1,5 @@
+ #!/usr/bin/python
++# -*- coding: utf-8 -*-
+ """
+ Copyright (C) 2003 John-Paul Gignac
+
diff --git a/staging/pathological/pathological.desktop b/staging/pathological/pathological.desktop
new file mode 100644
index 000000000..54817684f
--- /dev/null
+++ b/staging/pathological/pathological.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Pathological
+Comment=A puzzle game involving paths and marbles
+Exec=pathological
+Icon=pathological.xpm
+Terminal=false
+Type=Application
+Categories=Application;Game;
diff --git a/staging/pathological/pathological.install b/staging/pathological/pathological.install
new file mode 100644
index 000000000..4bc716839
--- /dev/null
+++ b/staging/pathological/pathological.install
@@ -0,0 +1,29 @@
+post_install() {
+if [ ! -e var/games/pathological_scores ]; then
+ cat << _EOF > var/games/pathological_scores
+0 all-boards 1 John-Paul
+0 all-boards 1 Kim
+0 all-boards 1 Matths
+0 all-boards 1 Carrie
+0 all-boards 1 Mike
+0 all-boards 1 Dale
+0 all-boards 1 Alesh
+0 all-boards 1 Thanks to
+0 all-boards 1 everyone who
+0 all-boards 1 contributed!
+_EOF
+fi
+ chown root:games var/games/pathological_scores
+ chmod 664 var/games/pathological_scores
+}
+
+pre_upgrade() {
+ if [ -e usr/share/games/pathological/pathological_scores ]; then
+ mv usr/share/games/pathological/pathological_scores var/games/
+ fi
+}
+
+post_upgrade() {
+ chown root:games var/games/pathological_scores
+ chmod 664 var/games/pathological_scores
+}
diff --git a/staging/pathological/pygame_181.patch b/staging/pathological/pygame_181.patch
new file mode 100644
index 000000000..4789f1519
--- /dev/null
+++ b/staging/pathological/pygame_181.patch
@@ -0,0 +1,10 @@
+--- pathological-1.1.3.orig.orig/pathological.py 2009-04-15 10:50:11.000000000 -0400
++++ pathological-1.1.3.orig/pathological.py 2009-04-15 10:50:56.000000000 -0400
+@@ -169,6 +169,7 @@
+ if not pygame.mixer or not pygame.mixer.music:
+ print "Background music not available."
+ return
++ pygame.mixer.music.stop()
+ fullname = os.path.join('music', name)
+ try:
+ pygame.mixer.music.load(fullname)