summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fisette <ribosome@gentoo.org>2004-12-23 18:37:10 +0000
committerOlivier Fisette <ribosome@gentoo.org>2004-12-23 18:37:10 +0000
commitaad263c9285eacbf02883351e65678e345cd2c17 (patch)
tree047a63384e495915775ce9e9f7f786f30bbc5183 /sci-biology/foldingathome
parentMoving to sci-biology/foldingathome (diff)
downloadgentoo-2-aad263c9285eacbf02883351e65678e345cd2c17.tar.gz
gentoo-2-aad263c9285eacbf02883351e65678e345cd2c17.tar.bz2
gentoo-2-aad263c9285eacbf02883351e65678e345cd2c17.zip
Moved from app-sci/foldingathome to sci-biology/foldingathome.
Diffstat (limited to 'sci-biology/foldingathome')
-rw-r--r--sci-biology/foldingathome/ChangeLog92
-rw-r--r--sci-biology/foldingathome/Manifest20
-rw-r--r--sci-biology/foldingathome/files/copy_client_config29
-rw-r--r--sci-biology/foldingathome/files/digest-foldingathome-4.0.01
-rw-r--r--sci-biology/foldingathome/files/digest-foldingathome-4.0.0-r21
-rw-r--r--sci-biology/foldingathome/files/digest-foldingathome-5.0.21
-rw-r--r--sci-biology/foldingathome/files/folding-conf.d27
-rw-r--r--sci-biology/foldingathome/files/folding-conf.d-r129
-rw-r--r--sci-biology/foldingathome/files/folding-init.d24
-rw-r--r--sci-biology/foldingathome/files/folding-init.d-r129
-rw-r--r--sci-biology/foldingathome/files/folding-init.d-r226
-rw-r--r--sci-biology/foldingathome/files/folding-init.d-r325
-rw-r--r--sci-biology/foldingathome/files/folding-init.d-r438
-rwxr-xr-xsci-biology/foldingathome/files/folding.sh3
-rwxr-xr-xsci-biology/foldingathome/files/initfolding3
-rw-r--r--sci-biology/foldingathome/files/initfolding-r119
-rw-r--r--sci-biology/foldingathome/files/initfolding-r26
-rw-r--r--sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild77
-rw-r--r--sci-biology/foldingathome/foldingathome-4.0.0.ebuild56
-rw-r--r--sci-biology/foldingathome/foldingathome-5.0.2.ebuild79
-rw-r--r--sci-biology/foldingathome/metadata.xml5
21 files changed, 590 insertions, 0 deletions
diff --git a/sci-biology/foldingathome/ChangeLog b/sci-biology/foldingathome/ChangeLog
new file mode 100644
index 000000000000..d75c78a2521f
--- /dev/null
+++ b/sci-biology/foldingathome/ChangeLog
@@ -0,0 +1,92 @@
+# ChangeLog for app-sci/foldingathome
+# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+*foldingathome-4.0.0-r2 (23 Dec 2004)
+
+ 23 Dec 2004; Olivier Fisette <ribosome@gentoo.org> +metadata.xml,
+ +files/copy_client_config, +files/folding-conf.d, +files/folding-conf.d-r1,
+ +files/folding-init.d, +files/folding-init.d-r1, +files/folding-init.d-r2,
+ +files/folding-init.d-r3, +files/folding-init.d-r4, +files/folding.sh,
+ +files/initfolding, +files/initfolding-r1, +files/initfolding-r2,
+ +foldingathome-4.0.0-r2.ebuild, +foldingathome-4.0.0.ebuild,
+ +foldingathome-5.0.2.ebuild:
+ Moved from app-sci/foldingathome to sci-biology/foldingathome.
+
+ 13 Dec 2004; Patrick Kursawe <phosphan@gentoo.org>
+ -foldingathome-4.0.0-r1.ebuild:
+ Cleanup
+
+*foldingathome-5.0.2 (09 Nov 2004)
+
+ 09 Nov 2004; Steve Arnold <nerdboy@gentoo.org> +files/copy_client_config,
+ +files/folding-conf.d-r1, +files/folding-init.d-r4, +files/initfolding-r2,
+ +foldingathome-5.0.2.ebuild:
+ bumped to current version (bug 60318) with ebuild from Gregory P. Smith
+ <greg-gentoo@electricrain.com>. Gentoo team config.
+
+ 12 Jun 2004; Danny van Dyk <kugelfang@gentoo.org>
+ foldingathome-4.0.0-r2.ebuild:
+ Marked ~amd64.
+
+*foldingathome-4.0.0-r2 (07 Jun 2004)
+
+ 07 Jun 2004; Patrick Kursawe <phosphan@gentoo.org>
+ foldingathome-3.24-r1.ebuild, foldingathome-3.24.ebuild,
+ foldingathome-4.0.0-r2.ebuild, files/folding-init.d-r3:
+ No longer redirecting output to a redundand log file, see bug #51489
+ Cleanup, removing 3.x versions.
+
+ 23 Apr 2004; David Holm <dholm@gentoo.org> foldingathome-4.0.0-r1.ebuild:
+ Added to ~ppc.
+
+*foldingathome-4.0.0-r1 (22 Apr 2004)
+
+ 22 Apr 2004; Patrick Kursawe <phosphan@gentoo.org>
+ foldingathome-4.0.0-r1.ebuild, files/folding-conf.d,
+ files/folding-init.d-r2, files/initfolding-r1:
+ Added support to run multiple clients for those with multiprocessors
+ and the ability to pass options to the Folding clients.
+ Based on bug #47526 (by Mike Caley <mjcaley@darkarctic.com>)
+
+ 26 Mar 2004; Patrick Kursawe <phosphan@gentoo.org>
+ foldingathome-3.14.ebuild, foldingathome-3.24-r1.ebuild,
+ foldingathome-3.24.ebuild, foldingathome-4.0.0.ebuild:
+ Setting IUSE, removing S= where not necessary, declaring 4.0.0 stable for x86
+
+ 09 Mar 2004; Daniel Ahlberg <aliz@gentoo.org> foldingathome-4.0.0.ebuild:
+ Adding amd64 keyword. Closing #43779.
+
+*foldingathome-4.0.0 (03 Mar 2004)
+
+ 03 Mar 2004; Patrick Kursawe <phosphan@gentoo.org>
+ foldingathome-4.0.0.ebuild:
+ Version bump inspired by bug #34859
+
+*foldingathome-3.24-r1 (01 Mar 2004)
+
+ 01 Mar 2004; Patrick Kursawe <phosphan@gentoo.org>
+ foldingathome-3.24-r1.ebuild, files/folding-init.d-r1, files/folding.sh,
+ files/initfolding:
+ Running as seperate user now.
+
+ 05 May 2003; Daniel Ahlberg <aliz@gentoo.org> files/folding-init.d :
+ Fixed stop() in init script. Fix by
+ Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl> in #20327.
+
+ 23 Apr 2003; Daniel Ahlberg <aliz@gentoo.org> foldingathome-3.2.4.ebuild, files/folding-init.d :
+ Now has the version number in SRC_URI and also uses the newer client if we're running >=glibc-2.3.0.
+ Also updated init script. Closes #19709 and #17715.
+
+*foldingathome-3.24 (27 Feb 2003)
+
+ 27 Feb 2003; Daniel Ahlberg <aliz@gentoo.org> foldingathome-3.24.ebuild :
+ Version bump.
+
+ 27 Feb 2003; Daniel Ahlberg <aliz@gentoo.org> files/folding-init.d :
+ Start the daemon with nice, closes #12950.
+
+*foldingathome-3.14 (04 Nov 2002)
+
+ 04 Nov 2002; Daniel Ahlberg <aliz@gentoo.org> :
+ Initial import. Ebuild contributed by Ryan Shaw <ryan.shaw@stanfordalumni.org> in #9535.
diff --git a/sci-biology/foldingathome/Manifest b/sci-biology/foldingathome/Manifest
new file mode 100644
index 000000000000..f76bc4d9ebc2
--- /dev/null
+++ b/sci-biology/foldingathome/Manifest
@@ -0,0 +1,20 @@
+MD5 b0af599249fff5886fef0f3856b09eaa foldingathome-4.0.0-r2.ebuild 1903
+MD5 6f2db7b7565ac75c66f6db8922e3f65c foldingathome-4.0.0.ebuild 1447
+MD5 d2c0fcac327152ebfbd2515a2f34729b ChangeLog 3176
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+MD5 04d6c34d9f84f01b61fab60c2b904943 foldingathome-5.0.2.ebuild 2008
+MD5 a586f7af900f3c15982e59730e7e082a files/folding-conf.d 1125
+MD5 91f88a421f87928d798002ede77fa8f9 files/initfolding 80
+MD5 9c9e4e6f2559cf1191b842ad06da6689 files/folding-init.d 535
+MD5 cd07557b5a0c08853562d0a5ae204d78 files/copy_client_config 756
+MD5 9c93f287339458f575ee4c5d20fffdfe files/initfolding-r1 656
+MD5 f3a9e0a439c14bd3d328cea6e3af1540 files/initfolding-r2 150
+MD5 3174784abb8ed1da2fc846d722aeffe5 files/folding-conf.d-r1 1172
+MD5 6c633c6cc20e087d9da4585c5d9563dc files/digest-foldingathome-4.0.0-r2 66
+MD5 f0462622685d1daf28447505a5f6cc85 files/folding-init.d-r1 738
+MD5 4a310628702e01fd17f5e7a9b8ec10f8 files/folding-init.d-r2 699
+MD5 84d1c6aa59e3e57a12742c5e1224050f files/folding-init.d-r3 637
+MD5 6a92a0cf0235a646731c882e19840b43 files/folding-init.d-r4 1155
+MD5 aec1f2de50cf95bf1797d61ae94b3b04 files/folding.sh 88
+MD5 6c633c6cc20e087d9da4585c5d9563dc files/digest-foldingathome-4.0.0 66
+MD5 2f181dd626be0626fc9000536fd0d4c4 files/digest-foldingathome-5.0.2 61
diff --git a/sci-biology/foldingathome/files/copy_client_config b/sci-biology/foldingathome/files/copy_client_config
new file mode 100644
index 000000000000..f12d1258a1b4
--- /dev/null
+++ b/sci-biology/foldingathome/files/copy_client_config
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+
+import shutil, sys, os
+from ConfigParser import ConfigParser
+
+GENTOO_TEAM = 11298
+
+if not os.path.isfile("/opt/foldingathome/client1/client.cfg"):
+ print "Folding@Home installation hasn't been configured yet"
+ sys.exit(1)
+
+clientnum = (1, 2, 3, 4, 5, 6, 7, 8)
+
+cfg = ConfigParser()
+cfg.read("/opt/foldingathome/client1/client.cfg")
+
+# if the user didn't chose a team at setup time put them on the gentoo team
+if cfg.get("settings", 'team') == '0':
+ cfg.set("settings", 'team', GENTOO_TEAM)
+
+for i in clientnum:
+ cfgName = "/opt/foldingathome/client%d/client.cfg" % (i)
+ shutil.copyfile("/opt/foldingathome/client1/client.cfg", cfgName)
+
+ cfg.set("settings", 'machineid', i)
+
+ cfgFile = open(cfgName, "w")
+ cfg.write(cfgFile)
+
diff --git a/sci-biology/foldingathome/files/digest-foldingathome-4.0.0 b/sci-biology/foldingathome/files/digest-foldingathome-4.0.0
new file mode 100644
index 000000000000..6018adcfd4d5
--- /dev/null
+++ b/sci-biology/foldingathome/files/digest-foldingathome-4.0.0
@@ -0,0 +1 @@
+MD5 d8ca3f78a3fff62059b780891d4c1e06 FAH4Console-Linux.exe 246740
diff --git a/sci-biology/foldingathome/files/digest-foldingathome-4.0.0-r2 b/sci-biology/foldingathome/files/digest-foldingathome-4.0.0-r2
new file mode 100644
index 000000000000..6018adcfd4d5
--- /dev/null
+++ b/sci-biology/foldingathome/files/digest-foldingathome-4.0.0-r2
@@ -0,0 +1 @@
+MD5 d8ca3f78a3fff62059b780891d4c1e06 FAH4Console-Linux.exe 246740
diff --git a/sci-biology/foldingathome/files/digest-foldingathome-5.0.2 b/sci-biology/foldingathome/files/digest-foldingathome-5.0.2
new file mode 100644
index 000000000000..44de62a3f7fd
--- /dev/null
+++ b/sci-biology/foldingathome/files/digest-foldingathome-5.0.2
@@ -0,0 +1 @@
+MD5 4855e808fb94e6d2c5fde345aea0cdc3 FAH502-Linux.exe 249236
diff --git a/sci-biology/foldingathome/files/folding-conf.d b/sci-biology/foldingathome/files/folding-conf.d
new file mode 100644
index 000000000000..677bf8b582c6
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-conf.d
@@ -0,0 +1,27 @@
+# Config file for /etc/init.d/foldingathome
+
+# Enter options here to be passed to the Folding client:
+#
+# -oneunit Instruct the client to quit following the completion of one work unit.
+# -verbosity x Sets the output level, from 1 to 9 (max). The default is 3
+# -pause Pause after finishing & trying to send current unit
+# -forceasm Force core assembly optimizations to be used if available
+# -forceSSE On machines with an AMD processor, Core_78 gives priority to 3DNow over
+# SSE -- this overrides that.
+# -advmethods Request to be assigned any new Cores or work units.
+#
+# A full listing of options can be found here:
+# http://www.stanford.edu/group/pandegroup/folding/console-userguide.html
+# But use of other options are not recommended when using the Folding client
+# as a service.
+#
+FOLD_OPTS="-advmethods"
+
+# Number of clients to run
+#
+# Folding@Home isn't multithreaded, so if you're running multiple CPU's
+# you will need to run a client to run for each of your CPU's in order
+# to achieve the best performance for Folding@Home. Up to a maximum of 8.
+# Ex. A dual CPU system would use CPU=2
+#
+CPU=1
diff --git a/sci-biology/foldingathome/files/folding-conf.d-r1 b/sci-biology/foldingathome/files/folding-conf.d-r1
new file mode 100644
index 000000000000..ad4839b9d2af
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-conf.d-r1
@@ -0,0 +1,29 @@
+# Config file for /etc/init.d/foldingathome
+#
+# The f@h client configuration can be found in /opt/foldingathome/client1/client.cfg
+# Run /opt/foldingathome/initfolding to reconfigure that.
+#
+# Enter options here to be passed to the Folding client:
+#
+# -oneunit Instruct the client to quit following the completion of one work unit.
+# -verbosity x Sets the output level, from 1 to 9 (max). The default is 3
+# -forceasm Force core assembly optimizations to be used if available
+# -advmethods Request to be assigned any new Cores or work units.
+#
+# A full listing of options can be found here:
+# http://www.stanford.edu/group/pandegroup/folding/console-userguide.html
+# But use of other options are not recommended when using the Folding client
+# as a service.
+#
+#FOLD_OPTS="-advmethods"
+
+# Number of clients to run
+#
+# Folding@Home isn't multithreaded, so if you're running multiple CPU's
+# you will need to run a client to run for each of your CPU's in order
+# to achieve the best performance for Folding@Home. Up to a maximum of 8.
+# Ex. A dual CPU system would use CPU=2. The init script has code to
+# determine how many CPUs you have if you set CPU=0.
+#
+CPU=0
+
diff --git a/sci-biology/foldingathome/files/folding-init.d b/sci-biology/foldingathome/files/folding-init.d
new file mode 100644
index 000000000000..e7ccdc2d7f72
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-init.d
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/folding-init.d,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+start() {
+
+ ebegin "Starting Folding@home"
+ cd /opt/foldingathome
+ nice -n 19 ./foldingathome >&/dev/null&
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Folding@Home"
+ cd /opt/foldingathome
+ for I in FahCore*.exe
+ do
+ killall -q $I >/dev/null
+ done
+ killall foldingathome >/dev/null
+ eend $?
+}
+
diff --git a/sci-biology/foldingathome/files/folding-init.d-r1 b/sci-biology/foldingathome/files/folding-init.d-r1
new file mode 100644
index 000000000000..86d2cc1cec30
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-init.d-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/folding-init.d-r1,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+start() {
+ ebegin "Starting Folding@home"
+ if [ ! -f /opt/foldingathome/client.cfg ]; then
+ eerror "Can't start without initial configuration."
+ eerror "For first run configuration, please run"
+ eerror "/opt/foldingathome/initfolding"
+ return 1
+ fi
+ cd /opt/foldingathome
+ su foldingathome ./folding.sh
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Folding@Home"
+ cd /opt/foldingathome
+ for I in FahCore*.exe
+ do
+ killall -q $I >/dev/null
+ done
+ killall foldingathome >/dev/null
+ eend $?
+}
+
diff --git a/sci-biology/foldingathome/files/folding-init.d-r2 b/sci-biology/foldingathome/files/folding-init.d-r2
new file mode 100644
index 000000000000..3438d79ffea3
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-init.d-r2
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/folding-init.d-r2,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+start() {
+ ebegin "Starting Folding@Home"
+ for (($CPU; CPU != 0; CPU--))
+ do
+ cd /opt/foldingathome/client${CPU}/
+ rm -f /opt/foldingathome/log-${CPU}
+ nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" 2>&1 >/opt/foldingathome/log-${CPU} &
+ done
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Folding@Home"
+ for I in FahCore*.exe
+ do
+ killall -q $I >/dev/null
+ done
+ killall foldingathome >/dev/null
+ eend $?
+}
+
diff --git a/sci-biology/foldingathome/files/folding-init.d-r3 b/sci-biology/foldingathome/files/folding-init.d-r3
new file mode 100644
index 000000000000..eaeda24dad93
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-init.d-r3
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/folding-init.d-r3,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+start() {
+ ebegin "Starting Folding@Home"
+ for (($CPU; CPU != 0; CPU--))
+ do
+ cd /opt/foldingathome/client${CPU}/
+ nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" &>/dev/null &
+ done
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Folding@Home"
+ for I in FahCore*.exe
+ do
+ killall -q $I >/dev/null
+ done
+ killall foldingathome >/dev/null
+ eend $?
+}
+
diff --git a/sci-biology/foldingathome/files/folding-init.d-r4 b/sci-biology/foldingathome/files/folding-init.d-r4
new file mode 100644
index 000000000000..e31d0ef09ae5
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding-init.d-r4
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/folding-init.d-r4,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+start() {
+ ebegin "Starting Folding@Home"
+ if [ $CPU = 0 -a -r /proc/cpuinfo ]; then
+ CPU=`grep processor </proc/cpuinfo | wc -l`
+ fi
+ su foldingathome -c /opt/foldingathome/copy_client_config
+ for (($CPU; CPU != 0; CPU--))
+ do
+ cd /opt/foldingathome/client${CPU}/
+ nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" &>/dev/null &
+ done
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Folding@Home"
+ if [ $CPU = 0 -a -r /proc/cpuinfo ]; then
+ CPU=`grep processor </proc/cpuinfo | wc -l`
+ fi
+ for (($CPU; CPU != 0; CPU--))
+ do
+ cd /opt/foldingathome/client${CPU}/
+ for I in FahCore*.exe
+ do
+ killall -q $I >/dev/null
+ done
+ done
+ # killing the Core(s) above shuts the top level foldingathome process
+ # down for us; don't kill it here.
+ #killall foldingathome >/dev/null
+ eend $?
+}
+
diff --git a/sci-biology/foldingathome/files/folding.sh b/sci-biology/foldingathome/files/folding.sh
new file mode 100755
index 000000000000..9a206fcfb1d6
--- /dev/null
+++ b/sci-biology/foldingathome/files/folding.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd /opt/foldingathome
+nice -n 20 ./foldingathome &>/opt/foldingathome/log &
diff --git a/sci-biology/foldingathome/files/initfolding b/sci-biology/foldingathome/files/initfolding
new file mode 100755
index 000000000000..90d17068e9d0
--- /dev/null
+++ b/sci-biology/foldingathome/files/initfolding
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd /opt/foldingathome
+su foldingathome -c "./foldingathome -config"
diff --git a/sci-biology/foldingathome/files/initfolding-r1 b/sci-biology/foldingathome/files/initfolding-r1
new file mode 100644
index 000000000000..aa62f2cc47a3
--- /dev/null
+++ b/sci-biology/foldingathome/files/initfolding-r1
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+import os, shutil
+
+os.chdir("/opt/foldingathome/client1")
+os.system("/opt/foldingathome/client1/foldingathome -configonly")
+os.system("chown -R foldingathome:nogroup /opt/foldingathome")
+
+clientnum = (1, 2, 3, 4, 5, 6, 7, 8)
+
+for i in clientnum:
+ shutil.copyfile("/opt/foldingathome/client1/client.cfg", "/opt/foldingathome/client%d/client.cfg" % (i))
+ clientfile = open("/opt/foldingathome/client%d/client.cfg" % (i), "r")
+ lines = clientfile.readlines()
+ lines[4] = "machineid=%d\n" % (i)
+ clientfile.close()
+ clientfile = open("/opt/foldingathome/client%d/client.cfg" % (i), "w")
+ clientfile.writelines(lines)
+ clientfile.close()
diff --git a/sci-biology/foldingathome/files/initfolding-r2 b/sci-biology/foldingathome/files/initfolding-r2
new file mode 100644
index 000000000000..1e39fa32359d
--- /dev/null
+++ b/sci-biology/foldingathome/files/initfolding-r2
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd /opt/foldingathome/client1
+/opt/foldingathome/client1/foldingathome -configonly
+/bin/chown -R foldingathome:nogroup /opt/foldingathome
+
diff --git a/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild b/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild
new file mode 100644
index 000000000000..194ddc1f4d1a
--- /dev/null
+++ b/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-4.0.0-r2.ebuild,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+# no version number on this install dir since upgrades will be using same dir
+# (data will be stored here too)
+I="/opt/foldingathome"
+
+inherit eutils
+
+DESCRIPTION="Help simulate protein folding at home"
+HOMEPAGE="http://folding.stanford.edu/"
+SRC_URI="http://www.stanford.edu/group/pandegroup/release/FAH4Console-Linux.exe"
+RESTRICT="nomirror"
+
+SLOT="0"
+IUSE=""
+LICENSE="as-is"
+KEYWORDS="~x86 ~ppc ~amd64"
+
+DEPEND=">=sys-apps/baselayout-1.8.0
+ >=sys-libs/glibc-2.3.0
+ amd64? ( app-emulation/emul-linux-x86-baselibs )"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${A}" ${PN}
+}
+
+src_install() {
+ exeinto ${I}
+ newexe ${FILESDIR}/initfolding-r1 initfolding
+
+ # Clients
+ exeinto ${I}/client1
+ doexe foldingathome
+ exeinto ${I}/client2
+ doexe foldingathome
+ exeinto ${I}/client3
+ doexe foldingathome
+ exeinto ${I}/client4
+ doexe foldingathome
+ exeinto ${I}/client5
+ doexe foldingathome
+ exeinto ${I}/client6
+ doexe foldingathome
+ exeinto ${I}/client7
+ doexe foldingathome
+ exeinto ${I}/client8
+ doexe foldingathome
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/folding-init.d-r3 foldingathome
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/folding-conf.d foldingathome
+}
+
+pkg_preinst() {
+ enewuser foldingathome -1 /bin/bash /opt/foldingathome
+}
+
+pkg_postinst() {
+ chown -R foldingathome:nogroup /opt/foldingathome
+ einfo "To run Folding@home in the background at boot:"
+ einfo " rc-update add foldingathome default"
+ einfo ""
+ einfo "Please run ${I}/initfolding to configure your client"
+ einfo "and edit /etc/conf.d/foldingathome for options"
+ einfo ""
+}
+
+pkg_postrm() {
+ einfo "Folding@home data files were not removed."
+ einfo " Remove them manually from ${I}"
+ einfo ""
+}
diff --git a/sci-biology/foldingathome/foldingathome-4.0.0.ebuild b/sci-biology/foldingathome/foldingathome-4.0.0.ebuild
new file mode 100644
index 000000000000..344cf02c3e80
--- /dev/null
+++ b/sci-biology/foldingathome/foldingathome-4.0.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-4.0.0.ebuild,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+# no version number on this install dir since upgrades will be using same dir
+# (data will be stored here too)
+I="/opt/foldingathome"
+
+inherit eutils
+
+DESCRIPTION="Help simulate protein folding at home"
+HOMEPAGE="http://folding.stanford.edu/"
+SRC_URI="http://www.stanford.edu/group/pandegroup/release/FAH4Console-Linux.exe"
+RESTRICT="nomirror"
+
+SLOT="0"
+IUSE=""
+LICENSE="as-is"
+KEYWORDS="x86"
+
+DEPEND=">=sys-apps/baselayout-1.8.0
+ >=sys-libs/glibc-2.3.0
+ amd64? ( app-emulation/emul-linux-x86-baselibs )"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${A}" ${PN}
+}
+
+src_install() {
+ exeinto ${I}
+ doexe foldingathome
+ doexe ${FILESDIR}/folding.sh
+ doexe ${FILESDIR}/initfolding
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/folding-init.d-r1 foldingathome
+}
+
+pkg_preinst() {
+ enewuser foldingathome -1 /bin/bash /opt/foldingathome
+}
+
+pkg_postinst() {
+ chown -R foldingathome:nogroup /opt/foldingathome
+ einfo "To run Folding@home in the background at boot:"
+ einfo " rc-update add foldingathome default"
+ einfo ""
+ einfo "For first run configuration, please run /opt/foldingathome/initfolding"
+}
+
+pkg_postrm() {
+ einfo "Folding@home data files were not removed."
+ einfo " Remove them manually from ${I}"
+ einfo ""
+}
diff --git a/sci-biology/foldingathome/foldingathome-5.0.2.ebuild b/sci-biology/foldingathome/foldingathome-5.0.2.ebuild
new file mode 100644
index 000000000000..0f4b250c4950
--- /dev/null
+++ b/sci-biology/foldingathome/foldingathome-5.0.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-5.0.2.ebuild,v 1.1 2004/12/23 18:37:10 ribosome Exp $
+
+# no version number on this install dir since upgrades will be using same dir
+# (data will be stored here too)
+I="/opt/foldingathome"
+
+inherit eutils
+
+DESCRIPTION="Help simulate protein folding at home"
+HOMEPAGE="http://folding.stanford.edu/"
+SRC_URI="http://www.stanford.edu/group/pandegroup/release/FAH502-Linux.exe"
+RESTRICT="nomirror"
+
+SLOT="0"
+IUSE=""
+LICENSE="as-is"
+KEYWORDS="~x86 ~amd64"
+
+DEPEND=">=sys-apps/baselayout-1.8.0
+ >=sys-libs/glibc-2.3.0
+ amd64? ( app-emulation/emul-linux-x86-baselibs )"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${A}" ${PN}
+}
+
+src_install() {
+ exeinto ${I}
+ newexe ${FILESDIR}/initfolding-r2 initfolding
+ newexe ${FILESDIR}/copy_client_config copy_client_config
+
+ # Clients
+ exeinto ${I}/client1
+ doexe foldingathome
+ exeinto ${I}/client2
+ doexe foldingathome
+ exeinto ${I}/client3
+ doexe foldingathome
+ exeinto ${I}/client4
+ doexe foldingathome
+ exeinto ${I}/client5
+ doexe foldingathome
+ exeinto ${I}/client6
+ doexe foldingathome
+ exeinto ${I}/client7
+ doexe foldingathome
+ exeinto ${I}/client8
+ doexe foldingathome
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/folding-init.d-r4 foldingathome
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/folding-conf.d-r1 foldingathome
+}
+
+pkg_preinst() {
+ # the bash shell is important for "su -c" in init script
+ enewuser foldingathome -1 /bin/bash /opt/foldingathome
+}
+
+pkg_postinst() {
+ chown -R foldingathome:nogroup /opt/foldingathome
+ einfo "To run Folding@home in the background at boot:"
+ einfo " rc-update add foldingathome default"
+ einfo ""
+ einfo "Please run ${I}/initfolding to configure your client"
+ einfo "and edit /etc/conf.d/foldingathome for options"
+ einfo ""
+}
+
+pkg_postrm() {
+ einfo "Folding@home data files were not removed."
+ einfo " Remove them manually from ${I}"
+ einfo ""
+}
diff --git a/sci-biology/foldingathome/metadata.xml b/sci-biology/foldingathome/metadata.xml
new file mode 100644
index 000000000000..b229aec85b8f
--- /dev/null
+++ b/sci-biology/foldingathome/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+</pkgmetadata>