Updated the initscript to use start-stop-daemon. Added the option to run mprime as...
authorMichael Januszewski <spock@gentoo.org>
Sun, 6 Nov 2005 13:38:48 +0000 (13:38 +0000)
committerMichael Januszewski <spock@gentoo.org>
Sun, 6 Nov 2005 13:38:48 +0000 (13:38 +0000)
Package-Manager: portage-2.0.53_rc7

sci-mathematics/gimps/ChangeLog
sci-mathematics/gimps/Manifest
sci-mathematics/gimps/files/digest-gimps-24.14-r1 [new file with mode: 0644]
sci-mathematics/gimps/files/gimps-24.14-conf.d [new file with mode: 0644]
sci-mathematics/gimps/files/gimps-24.14-init.d [new file with mode: 0755]
sci-mathematics/gimps/gimps-24.14-r1.ebuild [new file with mode: 0644]

index 074a78f1ec6d1a7cc1106304fbdfa4478067e5a5..f3b40a8f082989ceff8da31d624c0edf163655ef 100644 (file)
@@ -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.
index ce09404470029e7c0637d4cb94ae3eb65a160171..97e579c169ca6ba25c1dd7e753a3d1ba45d2796d 100644 (file)
@@ -1,18 +1,22 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 267ef463c05b267257a0901d0f14184e ChangeLog 2810
+MD5 851ace909b8d15c8fec9da1c3cbf160e ChangeLog 3093
 MD5 d84449f9d7cdf190e22c6be4ccd485fa files/digest-gimps-24.13 62
 MD5 59b44ec0de10774c77941413d23f7608 files/digest-gimps-24.14 62
+MD5 59b44ec0de10774c77941413d23f7608 files/digest-gimps-24.14-r1 62
+MD5 317ec6140b05f0e8fbb5eab409f0ef4a files/gimps-24.14-conf.d 306
+MD5 b7719db3d3bfe39c0df6d95b34691d5c files/gimps-24.14-init.d 686
 MD5 33a08082d7b3dfeef6076ff5a4bdb1d0 files/gimps-conf.d 276
 MD5 f7593578a8d077eda7d23c5a894ff1d9 files/gimps-init.d 535
 MD5 66ef0bb965fdfd6791cf3ea20a37c5a6 gimps-24.13.ebuild 1565
+MD5 f163430b9e6ca6524881736eff8f8213 gimps-24.14-r1.ebuild 1614
 MD5 936cb0c6477a4c19f39342db7a23952a gimps-24.14.ebuild 1600
 MD5 d94d306da3804e41296e1bf04c7c9cae metadata.xml 255
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
+Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFDTVFRwUpWvClEHQoRAmLOAJ4+GKayjNX4SPY3YjUNPp1hp+uXFgCeK1tr
-j7OEZyn6JSqUT/09c0It91I=
-=nI/8
+iD8DBQFDbgeDchej4aZK9/cRAkZNAJ4hRKXtuHRYrEcXt4qJZSQr8zICSACfZcIL
+sTvZzciiP05AvbLB6oVns9M=
+=pW7s
 -----END PGP SIGNATURE-----
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 (file)
index 0000000..29fb250
--- /dev/null
@@ -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 (file)
index 0000000..6b1106d
--- /dev/null
@@ -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 (executable)
index 0000000..354cc42
--- /dev/null
@@ -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 (file)
index 0000000..64c87fd
--- /dev/null
@@ -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
+}