summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-01-26 19:35:29 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-01-26 19:35:29 (GMT)
commit6980e3d3f5dbc51bd787c2ad490dc7b3c160199c (patch)
tree30395623abc4d387d688d82effbe1e76358c773b /abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff
parent1c50f83d6e7d4b0f5bdff9edd9e3a71a25abe423 (diff)
downloadlinhes_pkgbuild-6980e3d3f5dbc51bd787c2ad490dc7b3c160199c.zip
linhes_pkgbuild-6980e3d3f5dbc51bd787c2ad490dc7b3c160199c.tar.gz
linhes_pkgbuild-6980e3d3f5dbc51bd787c2ad490dc7b3c160199c.tar.bz2
Initial PKGBUILD for Folding at Home.
Diffstat (limited to 'abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff')
-rw-r--r--abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff110
1 files changed, 110 insertions, 0 deletions
diff --git a/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff b/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff
new file mode 100644
index 0000000..73410f1
--- /dev/null
+++ b/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff
@@ -0,0 +1,110 @@
+diff -Naur blank/foldingathome.conf.d 6.02-1/foldingathome.conf.d
+--- blank/foldingathome.conf.d 1969-12-31 16:00:00.000000000 -0800
++++ 6.02-1/foldingathome.conf.d 2008-08-21 16:59:05.000000000 -0700
+@@ -0,0 +1,12 @@
++#
++# Optional user settings for foldingathome daemon
++#
++# If you prefer not to run fah as root then you can identifer a current or
++# specially created user here.
++
++FAH_USER=""
++
++# If you wish to associate this user with a specific group you can enter the
++# group name here. If left blank the default is "users".
++
++FAH_GRP=""
+diff -Naur blank/foldingathome.license 6.02-1/foldingathome.license
+--- blank/foldingathome.license 1969-12-31 16:00:00.000000000 -0800
++++ 6.02-1/foldingathome.license 2008-08-21 16:59:27.000000000 -0700
+@@ -0,0 +1,26 @@
++Folding@Home distributed computing client
++Copyright 2001-2007. Stanford University. All Rights Reserved.
++
++License Agreement:
++
++Please carefully read the following terms and conditions before using this software. Use of this software
++indicates acceptance of this license agreement and disclaimer of all warranties.
++
++Disclaimer of Warranty:
++
++IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
++OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
++DOCUMENTATION, EVEN IF STANFORD UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++STANFORD UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING
++DOCUMENTATION PROVIDED HEREUNDER IS PROVIDED "AS IS". Folding@home HAS NO OBLIGATION TO PROVIDE
++MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
++
++Restrictions:
++
++You may use this software on a computer system only if you own the system or have the permission of the owner.
++You may not alter the software or associated data files.
++You may only use unmodified versions of Folding@home obtained through authorized distributors to connect
++to the Folding@Home servers. Use of other software to connect to the Folding@home servers is strictly prohibited.
++Distribution of this software is prohibited. It may only be obtained by downloading from Stanford's web site
++(http://folding.stanford.edu and pages linked therein) or the web site of one of our commercial partners (Sony, NVIDIA, and ATI).
+diff -Naur blank/foldingathome.rc.d 6.02-1/foldingathome.rc.d
+--- blank/foldingathome.rc.d 1969-12-31 16:00:00.000000000 -0800
++++ 6.02-1/foldingathome.rc.d 2008-08-21 17:00:48.000000000 -0700
+@@ -0,0 +1,60 @@
++#!/bin/bash
++#/etc/rc.d/foldingathome
++#
++# Starts the Folding@Home client in the background
++
++. /etc/rc.conf
++. /etc/rc.d/functions
++. /etc/conf.d/foldingathome
++
++PID=`pidof -o %PPID /opt/fah/fah6`
++case "$1" in
++ start)
++ stat_busy "Starting Folding@Home"
++ if [ -z "$PID" ]; then
++ if [ ! -z "$FAH_USER" ] ; then
++ if [ ! -d "/opt/fah/$FAH_USER" ] ; then
++ mkdir /opt/fah/$FAH_USER
++ chown $FAH_USER /opt/fah/$FAH_USER
++ if [ ! -z "$FAH_GRP" ] ; then
++ chgrp $FAH_GRP /opt/fah/$FAH_USER
++ else
++ chgrp users /opt/fah/$FAH_USER
++ fi
++ fi
++ cd /opt/fah/$FAH_USER
++ su $FAH_USER -c "nice --adjustment 19 /opt/fah/fah6 -verbosity 9 > /opt/fah/$FAH_USER/myfah.log" &
++ else
++ cd /opt/fah
++ nice --adjustment 19 /opt/fah/fah6 -verbosity 9 > /opt/fah/myfah.log &
++ fi
++ fi
++ if [ ! -z "$PID" -o $? -gt 0 ]; then
++ stat_fail
++ else
++ add_daemon foldingathome
++ stat_done
++ fi
++ ;;
++
++ stop)
++ stat_busy "Stopping Folding@Home"
++ [ ! -z "$PID" ]&& kill $PID &> /dev/null
++ if [ $? -gt 0 ]; then
++ stat_fail
++ else
++ rm_daemon foldingathome
++ stat_done
++ fi
++ ;;
++
++ restart)
++ $0 stop
++ sleep 1
++ $0 start
++ ;;
++
++ *)
++ echo $"Usage: $0 {start|stop|restart}"
++esac
++