diff options
author | Jeffrey Gardner <je_fro@gentoo.org> | 2008-08-03 03:19:59 +0000 |
---|---|---|
committer | Jeffrey Gardner <je_fro@gentoo.org> | 2008-08-03 03:19:59 +0000 |
commit | fec9902cd1796ef270afd1c40ec73e9b33467445 (patch) | |
tree | 52e1cbe63dc15670a255de4ddcae9fe00e55c119 /sci-biology/foldingathome | |
parent | Version bump. add ~x86 kw. Remove old. (diff) | |
download | gentoo-2-fec9902cd1796ef270afd1c40ec73e9b33467445.tar.gz gentoo-2-fec9902cd1796ef270afd1c40ec73e9b33467445.tar.bz2 gentoo-2-fec9902cd1796ef270afd1c40ec73e9b33467445.zip |
Latest, thanks to Nicolas Schlumberger, closing bug #233751
(Portage version: 2.2_rc6/cvs/Linux 2.6.26-gentoo x86_64)
Diffstat (limited to 'sci-biology/foldingathome')
-rw-r--r-- | sci-biology/foldingathome/ChangeLog | 9 | ||||
-rw-r--r-- | sci-biology/foldingathome/files/6.02/fah-init | 36 | ||||
-rw-r--r-- | sci-biology/foldingathome/files/6.02/folding-conf.d | 21 | ||||
-rw-r--r-- | sci-biology/foldingathome/files/6.02/initfolding | 6 | ||||
-rw-r--r-- | sci-biology/foldingathome/foldingathome-6.02.ebuild | 60 |
5 files changed, 131 insertions, 1 deletions
diff --git a/sci-biology/foldingathome/ChangeLog b/sci-biology/foldingathome/ChangeLog index 083f65061794..21cb0ae93c99 100644 --- a/sci-biology/foldingathome/ChangeLog +++ b/sci-biology/foldingathome/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-biology/foldingathome # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.21 2008/06/15 04:36:41 je_fro Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/ChangeLog,v 1.22 2008/08/03 03:19:58 je_fro Exp $ + +*foldingathome-6.02 (03 Aug 2008) + + 03 Aug 2008; Jeff Gardner <je_fro@gentoo.org> +files/6.02/fah-init, + +files/6.02/folding-conf.d, +files/6.02/initfolding, + +foldingathome-6.02.ebuild: + Latest version, thanks to Nicolas Schlumberger, closes bug #233751 15 Jun 2008; Jeff Gardner <je_fro@gentoo.org> files/6.02_beta1/folding-conf.d: diff --git a/sci-biology/foldingathome/files/6.02/fah-init b/sci-biology/foldingathome/files/6.02/fah-init new file mode 100644 index 000000000000..c728c592a937 --- /dev/null +++ b/sci-biology/foldingathome/files/6.02/fah-init @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/files/6.02/fah-init,v 1.1 2008/08/03 03:19:59 je_fro Exp $ + +opts="${opts} unitinfo" + +unitinfo() { + einfo "$(head -n1 /opt/foldingathome/amd64-smp/unitinfo.txt):" + sed -e '1,2d' /opt/foldingathome/amd64-smp/unitinfo.txt +} + +start() { + ebegin "Starting Folding@Home" + cd /opt/foldingathome/amd64-smp + start-stop-daemon -v --chdir ${PWD} --chuid foldingathome --nicelevel 19 --start --background --exec ./fah6 -- ${FOLD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping Folding@Home" + start-stop-daemon -vv --stop --user foldingathome --exec /opt/foldingathome/amd64-smp/fah6 + cd /opt/foldingathome/amd64-smp + for I in FahCore*.exe; do + if ps ax|grep $I > /dev/null 2>&1; then + killall -q $I > /dev/null 2>&1 + fi + done + sleep 1 + if ps ax|grep '[/]opt[/]foldingathome[/]amd64-smp[/]fah6' > /dev/null 2>&1; then + eend 1 + else + eend 0 + fi +} + diff --git a/sci-biology/foldingathome/files/6.02/folding-conf.d b/sci-biology/foldingathome/files/6.02/folding-conf.d new file mode 100644 index 000000000000..114cd144a96c --- /dev/null +++ b/sci-biology/foldingathome/files/6.02/folding-conf.d @@ -0,0 +1,21 @@ +# Config file for /etc/init.d/foldingathome +# +# The f@h client configuration can be found in /opt/foldingathome/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. +# -smp Set the client to run in SMP mode (multicore) +# +# 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="-local" +PIDFILE=/var/run/folding + diff --git a/sci-biology/foldingathome/files/6.02/initfolding b/sci-biology/foldingathome/files/6.02/initfolding new file mode 100644 index 000000000000..e3bead5dde25 --- /dev/null +++ b/sci-biology/foldingathome/files/6.02/initfolding @@ -0,0 +1,6 @@ +#!/bin/sh + +cd /opt/foldingathome/amd64-smp +/opt/foldingathome/amd64-smp/fah6 -configonly +/bin/chown -R foldingathome:nogroup /opt/foldingathome/amd64-smp + diff --git a/sci-biology/foldingathome/foldingathome-6.02.ebuild b/sci-biology/foldingathome/foldingathome-6.02.ebuild new file mode 100644 index 000000000000..40323bf65f2f --- /dev/null +++ b/sci-biology/foldingathome/foldingathome-6.02.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-biology/foldingathome/foldingathome-6.02.ebuild,v 1.1 2008/08/03 03:19:58 je_fro Exp $ + +# no version number on this install dir since upgrades will be using same dir +# (data will be stored here too) +# The clientX files from old foldingathome will remain untouched. +I="/opt/foldingathome/amd64-smp" + +inherit eutils + +DESCRIPTION="Folding@Home is a distributed computing project for protein folding." +HOMEPAGE="http://folding.stanford.edu/FAQ-SMP.html" +SRC_URI="http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz" + +LICENSE="folding-at-home" +SLOT="0" + +# This is for x86_64 only. +KEYWORDS="~amd64" +IUSE="" + +DEPEND=">=sys-apps/baselayout-1.8.0 + >=sys-libs/glibc-2.3.0 + app-emulation/emul-linux-x86-baselibs" +RDEPEND="" + +S="${WORKDIR}" + +src_install() { + exeinto ${I} + newexe "${FILESDIR}"/${PV}/initfolding initfolding + doexe fah6 mpiexec + newconfd "${FILESDIR}"/${PV}/folding-conf.d foldingathome + newinitd "${FILESDIR}"/${PV}/fah-init 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 "" + einfo "This experimental F@H package exists alongside your old data files" + einfo "in ${I}." + einfo "" +} + +pkg_postrm() { + einfo "Folding@home data files were not removed." + einfo " Remove them manually from ${I}" + einfo "" +} |