summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Januszewski <spock@gentoo.org>2005-11-06 13:38:48 +0000
committerMichael Januszewski <spock@gentoo.org>2005-11-06 13:38:48 +0000
commit5d1bffa34ca2e9e771d150ebe3cf07f995f7aa89 (patch)
tree9ae14be70fa94623f45f4845eb430f264278f1df /sci-mathematics/gimps
parent~amd64 (diff)
downloadgentoo-2-5d1bffa34ca2e9e771d150ebe3cf07f995f7aa89.tar.gz
gentoo-2-5d1bffa34ca2e9e771d150ebe3cf07f995f7aa89.tar.bz2
gentoo-2-5d1bffa34ca2e9e771d150ebe3cf07f995f7aa89.zip
Updated the initscript to use start-stop-daemon. Added the option to run mprime as a non-root user (bug #107168).
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'sci-mathematics/gimps')
-rw-r--r--sci-mathematics/gimps/ChangeLog10
-rw-r--r--sci-mathematics/gimps/files/digest-gimps-24.14-r11
-rw-r--r--sci-mathematics/gimps/files/gimps-24.14-conf.d15
-rwxr-xr-xsci-mathematics/gimps/files/gimps-24.14-init.d32
-rw-r--r--sci-mathematics/gimps/gimps-24.14-r1.ebuild55
5 files changed, 112 insertions, 1 deletions
diff --git a/sci-mathematics/gimps/ChangeLog b/sci-mathematics/gimps/ChangeLog
index 074a78f1ec6d..f3b40a8f0829 100644
--- a/sci-mathematics/gimps/ChangeLog
+++ b/sci-mathematics/gimps/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-mathematics/gimps
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gimps/ChangeLog,v 1.12 2005/10/12 17:08:47 metalgod Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gimps/ChangeLog,v 1.13 2005/11/06 13:38:48 spock Exp $
+
+*gimps-24.14-r1 (06 Nov 2005)
+
+ 06 Nov 2005; Michał Januszewski <spock@gentoo.org>
+ +files/gimps-24.14-conf.d, +files/gimps-24.14-init.d,
+ +gimps-24.14-r1.ebuild:
+ Updated the initscript to use start-stop-daemon. Added the option to run
+ mprime as a non-root user (bug #107168).
12 Oct 2005; Luis Medinas <metalgod@gentoo.org> gimps-24.14.ebuild:
Marked Stable on amd64. Bug #108265.
diff --git a/sci-mathematics/gimps/files/digest-gimps-24.14-r1 b/sci-mathematics/gimps/files/digest-gimps-24.14-r1
new file mode 100644
index 000000000000..29fb25019ab7
--- /dev/null
+++ b/sci-mathematics/gimps/files/digest-gimps-24.14-r1
@@ -0,0 +1 @@
+MD5 eddab4e2ac2e79560a327a1768e3943a sprime2414.tar.gz 885581
diff --git a/sci-mathematics/gimps/files/gimps-24.14-conf.d b/sci-mathematics/gimps/files/gimps-24.14-conf.d
new file mode 100644
index 000000000000..6b1106d4e1fe
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps-24.14-conf.d
@@ -0,0 +1,15 @@
+# Config file for /etc/init.d/gimps
+
+USER="nobody"
+GROUP="nobody"
+
+# the number of CPUs GIMPS will use
+GIMPS_CPUS="1"
+
+# set up any options you want for GIMPS
+# for more info, `mprime -h`
+# GIMPS_OPTIONS=""
+
+# this is the directory where GIMPS run-time
+# data files will be stored
+GIMPS_DIR=/var/lib/gimps
diff --git a/sci-mathematics/gimps/files/gimps-24.14-init.d b/sci-mathematics/gimps/files/gimps-24.14-init.d
new file mode 100755
index 000000000000..354cc424f97f
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps-24.14-init.d
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e "${GIMPS_DIR}" ]; then
+ einfo "Creating ${GIMPS_DIR}"
+ /bin/mkdir "${GIMPS_DIR}"
+ fi
+
+ /bin/chown ${USER}:${GROUP} ${GIMPS_DIR}
+ /bin/chown ${USER}:${GROUP} ${GIMPS_DIR}/*
+}
+
+start() {
+ checkconfig
+ ebegin "Starting GIMPS"
+ start-stop-daemon --quiet --start --exec /opt/gimps/mprime \
+ --chdir ${GIMPS_DIR} --chuid ${USER}:${GROUP} \
+ -- -b${GIMPS_CPUS} -w${GIMPS_DIR} ${GIMPS_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping GIMPS"
+ start-stop-daemon --quiet --stop --exec /opt/gimps/mprime
+ eend $?
+}
diff --git a/sci-mathematics/gimps/gimps-24.14-r1.ebuild b/sci-mathematics/gimps/gimps-24.14-r1.ebuild
new file mode 100644
index 000000000000..64c87fd332ef
--- /dev/null
+++ b/sci-mathematics/gimps/gimps-24.14-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gimps/gimps-24.14-r1.ebuild,v 1.1 2005/11/06 13:38:48 spock Exp $
+
+IUSE=""
+DESCRIPTION="GIMPS - The Great Internet Mersenne Prime Search"
+HOMEPAGE="http://mersenne.org/"
+SRC_URI="ftp://mersenne.org/gimps/sprime${PV/./}.tar.gz"
+
+# We have to use the statically linked version since the dynamically
+# linked one requires gcc >= 3.4.4 (stdlibc++.so.6 dependency).
+
+DEPEND=">=sys-apps/baselayout-1.8.0
+ >=sys-libs/glibc-2.1"
+SLOT="0"
+LICENSE="as-is"
+KEYWORDS="-* ~amd64 ~x86"
+
+S="${WORKDIR}"
+I="/opt/gimps"
+
+src_install () {
+ cd ${S}
+
+ dodir ${I} /var/lib/gimps
+ cp mprime ${D}/${I}
+ chmod a-w ${D}/${I}/mprime
+ chown root:0 ${D}/${I}
+ chown root:0 ${D}/${I}/mprime
+
+ dodoc license.txt readme.txt stress.txt whatsnew.txt undoc.txt
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/gimps-24.14-init.d gimps
+ insinto /etc/conf.d ; newins ${FILESDIR}/gimps-24.14-conf.d gimps
+}
+
+pkg_postinst () {
+ echo
+ einfo "You can use \`/etc/init.d/gimps start\` to start a GIMPS client in the"
+ einfo "background at boot. Have a look at /etc/conf.d/gimps and check some"
+ einfo "configuration options."
+ einfo
+ einfo "If you don't want to use the init script to start gimps, remember to"
+ einfo "pass it an additional command line parameter specifying where the data"
+ einfo "files are to be stored, eg.:"
+ einfo " ${I}/mprime -w/var/lib/gimps"
+ echo
+}
+
+pkg_postrm () {
+ echo
+ einfo "GIMPS data files were not removed."
+ einfo "Remove them manually from /var/lib/gimps/"
+ echo
+}