summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/foldingathome
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-08-30 01:29:53 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-08-30 01:29:53 (GMT)
commita56552217f33d3ce4d72d65ca19056d45858a4ee (patch)
tree1dd5fe05379306ad4b0683b65e9da9db7c4a961f /abs/extra-testing/community/foldingathome
parente179d165396f026fa6053c6c055d00d16b5eb141 (diff)
downloadlinhes_pkgbuild-a56552217f33d3ce4d72d65ca19056d45858a4ee.zip
linhes_pkgbuild-a56552217f33d3ce4d72d65ca19056d45858a4ee.tar.gz
linhes_pkgbuild-a56552217f33d3ce4d72d65ca19056d45858a4ee.tar.bz2
LinHES-config mythinstall foldingathome: initial inclusion of Folding@home
Diffstat (limited to 'abs/extra-testing/community/foldingathome')
-rw-r--r--abs/extra-testing/community/foldingathome/PKGBUILD16
-rw-r--r--abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff110
-rw-r--r--[-rwxr-xr-x]abs/extra-testing/community/foldingathome/foldingathome.install56
3 files changed, 42 insertions, 140 deletions
diff --git a/abs/extra-testing/community/foldingathome/PKGBUILD b/abs/extra-testing/community/foldingathome/PKGBUILD
index 411702c..ffd256e 100644
--- a/abs/extra-testing/community/foldingathome/PKGBUILD
+++ b/abs/extra-testing/community/foldingathome/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=foldingathome
pkgver=6.02
-pkgrel=1
+pkgrel=2
pkgdesc="Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases."
arch=('i686')
url="http://folding.stanford.edu/"
@@ -13,16 +13,14 @@ depends=('bash')
backup=('etc/conf.d/foldingathome')
install=foldingathome.install
source=(http://www.stanford.edu/group/pandegroup/folding/release/FAH$pkgver-Linux.tgz
- archpatch_foldingathome.diff)
+ run)
md5sums=('112b3d66909050f1bb990993a1464cb9'
- '02f4ca64d552b442d484c51fa5f4228a')
+ '7e1b3f2a6768b4fbeb415922a1a9c2e6')
build() {
cd $startdir/src/
- patch -p1 <archpatch_foldingathome.diff
- install -D -c -m755 fah6 $startdir/pkg/opt/fah/fah6 || return 1
- install -D -c -m755 $startdir/src/foldingathome.rc.d $startdir/pkg/etc/rc.d/foldingathome || return 1
- install -D -c -m644 $startdir/src/foldingathome.conf.d $startdir/pkg/etc/conf.d/foldingathome || return 1
- install -D -m644 foldingathome.license $startdir/pkg/usr/share/licenses/$pkgname/COPYING
-
+
+ # At this stage, the mpiexec is not included because it requires x86_64.
+ install -D -c -m755 fah6 $startdir/pkg/usr/bin/fah6 || return 1
+ install -D -m755 run $startdir/pkg/etc/sv/fah/run
}
diff --git a/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff b/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff
deleted file mode 100644
index 73410f1..0000000
--- a/abs/extra-testing/community/foldingathome/archpatch_foldingathome.diff
+++ /dev/null
@@ -1,110 +0,0 @@
-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
-+
diff --git a/abs/extra-testing/community/foldingathome/foldingathome.install b/abs/extra-testing/community/foldingathome/foldingathome.install
index 8eedb6c..3ecc7c9 100755..100644
--- a/abs/extra-testing/community/foldingathome/foldingathome.install
+++ b/abs/extra-testing/community/foldingathome/foldingathome.install
@@ -1,30 +1,44 @@
-# arg 1: the new package version
post_install() {
- cat << 'EOM'
- --> Please cd to /opt/fah/ and execute ./fah6 -smp -configonly
- --> to configure your settings. Then add "foldingathome" to the list
- --> of daemons in /etc/rc.conf. If you would like to join the Arch
- --> Linux team, use team number 45032. To check current progress,
- --> point your browser to file://opt/fah/MyFolding.html
+ # Check for an R5.5 fah installation.
+ r5_fah_dir=/myth/folding@home
+ r6_fah_dir=/myth/folding_$(hostname)
+ if [ -d "$r5_fah_dir" ] ; then
+ if [ -d "$r6_fah_dir" ] ; then
+ cat << 'EOM'
+ --> You have an R5.5 and an R6 folding directory at the same time!
+ --> you should manually delete the R5.5 directory:
+ --> $r5_fah_dir
+EOM
+ else
+ mv $r5_fah_dir $r6_fah_dir
+ fi
+ else
+ if [ ! -d "$r6_fah_dir" ] ; then
+ mkdir $r6_fah_dir
+ cat > $r6_fah_dir/client.cfg << 'EOM'
+[settings]
+username=LinHES
+team=50975
+passkey=
+asknet=no
+bigpackets=normal
+machineid=1
- --> It is strongly recommended that you run foldingathome as a user other
- --> than root. You can identify a user in /etc/conf.d/foldingathome.
- --> A directory called /opt/fah/$FAH_USER will be created."
+[http]
+active=no
+host=localhost
+port=8080
EOM
-}
+ fi
+ fi
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- post_install $1
+ /sbin/add_service.sh fah
+ sleep 5
+ /sbin/sv -v start fah
}
-# arg 1: the old package version
pre_remove() {
- /bin/true
+ /sbin/sv stop fah
+ /sbin/remove_service.sh fah
}
-op=$1
-shift
-
-$op $*