diff options
Diffstat (limited to 'sci-biology/foldingathome/foldingathome-999.ebuild')
-rw-r--r-- | sci-biology/foldingathome/foldingathome-999.ebuild | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/sci-biology/foldingathome/foldingathome-999.ebuild b/sci-biology/foldingathome/foldingathome-999.ebuild new file mode 100644 index 0000000..e5d3645 --- /dev/null +++ b/sci-biology/foldingathome/foldingathome-999.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +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/~kasson/folding/linux/fah6_alt" + +LICENSE="folding-at-home" +SLOT="0" +KEYWORDS="~amd64" +IUSE="mpi" + +RDEPEND="mpi? ( >=sys-cluster/openmpi-1.4.3 )" + +S="${WORKDIR}" + +I="opt/foldingathome" + +QA_DT_HASH="${I}/.*" +QA_PRESTRIPPED="${I}/fah6_alt" + +pkg_setup() { + I="${EPREFIX}/${I}" +} + +src_install() { + exeinto ${I} + doexe "${FILESDIR}/${PV}"/initfolding || die + doexe fah6_alt || die + newconfd "${FILESDIR}/${PV}"/folding-conf.d foldingathome || die + newinitd "${FILESDIR}/${PV}"/fah-init foldingathome || die +} + +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 "${EPREFIX}"/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 ${EPREFIX}/etc/conf.d/foldingathome for options" + einfo "" + einfo "I encourage you to acquire a username and join team 36480." + einfo "http://folding.stanford.edu/English/Download#ntoc2" + einfo "" +} + +pkg_postrm() { + einfo "Folding@home data files were not removed." + einfo " Remove them manually from ${I}" + einfo "" +} |