summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ahlberg <aliz@gentoo.org>2003-05-04 13:36:48 +0000
committerDaniel Ahlberg <aliz@gentoo.org>2003-05-04 13:36:48 +0000
commitd0120aa21ef30b07f4ca45bb3f7c6b1d6f6a7245 (patch)
tree2d9a301738b689c5605ed1e9762f36f4da69a079 /app-sci
parentadded a cjk patch (diff)
downloadhistorical-d0120aa21ef30b07f4ca45bb3f7c6b1d6f6a7245.tar.gz
historical-d0120aa21ef30b07f4ca45bb3f7c6b1d6f6a7245.tar.bz2
historical-d0120aa21ef30b07f4ca45bb3f7c6b1d6f6a7245.zip
Closes #9467.
Diffstat (limited to 'app-sci')
-rw-r--r--app-sci/setiathome/ChangeLog9
-rw-r--r--app-sci/setiathome/files/digest-setiathome-3.08-r11
-rw-r--r--app-sci/setiathome/files/seti-conf.d-r17
-rw-r--r--app-sci/setiathome/files/seti-init.d-r145
-rw-r--r--app-sci/setiathome/setiathome-3.08-r1.ebuild75
5 files changed, 111 insertions, 26 deletions
diff --git a/app-sci/setiathome/ChangeLog b/app-sci/setiathome/ChangeLog
index 9e1e3598a1ff..0b35a179d101 100644
--- a/app-sci/setiathome/ChangeLog
+++ b/app-sci/setiathome/ChangeLog
@@ -1,8 +1,13 @@
# ChangeLog for app-sci/setiathome
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-sci/setiathome/ChangeLog,v 1.7 2003/04/09 08:39:49 aliz Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/setiathome/ChangeLog,v 1.8 2003/05/04 13:36:48 aliz Exp $
-*setiatome-3.08 (09 Apr 2003)
+*setiathome-3.08 (04 May 2003)
+
+ 04 May 2003; Daniel Ahlberg <aliz@gentoo.org> setiathome-3.08-r1.ebuild :
+ Closes #9467.
+
+*setiathome-3.08 (09 Apr 2003)
09 Par 2003; Daniel Ahlberg <aliz@gentoo.org> setiathome-3.08.ebuild :
Security update. Rewrote package fetching.
diff --git a/app-sci/setiathome/files/digest-setiathome-3.08-r1 b/app-sci/setiathome/files/digest-setiathome-3.08-r1
new file mode 100644
index 000000000000..891eb15ef822
--- /dev/null
+++ b/app-sci/setiathome/files/digest-setiathome-3.08-r1
@@ -0,0 +1 @@
+MD5 01d05178bd22c36b2e411dd12f23661a setiathome-3.08.i686-pc-linux-gnu.tar 247808
diff --git a/app-sci/setiathome/files/seti-conf.d-r1 b/app-sci/setiathome/files/seti-conf.d-r1
index 73dd342d6ef1..99da78b73b1f 100644
--- a/app-sci/setiathome/files/seti-conf.d-r1
+++ b/app-sci/setiathome/files/seti-conf.d-r1
@@ -1,7 +1,12 @@
# Config file for /etc/init.d/setiathome
+# specify the number of setiathome processes to start
+SETIATHOME_THREADS="1"
+
# set up any options you want for setiathome here
# for more info, `setiathome -h`
SETIATHOME_OPTIONS="-nice 19"
-# this is the directory where setiathome's data files will be stored
+# this is the directory where setiathome's run-time
+# data files will be stored
+SETIATHOME_DIR=/var/lib/setiathome
diff --git a/app-sci/setiathome/files/seti-init.d-r1 b/app-sci/setiathome/files/seti-init.d-r1
index cf582df820ca..6b41788d3a4a 100644
--- a/app-sci/setiathome/files/seti-init.d-r1
+++ b/app-sci/setiathome/files/seti-init.d-r1
@@ -1,34 +1,34 @@
#!/sbin/runscript
-cpus=`egrep -c "^bogomips" /proc/cpuinfo`
+if [ -z "${SETIATHOME_THREADS}" ]; then
+ SETIATHOME_THREADS=$( egrep -c "^bogomips" /proc/cpuinfo )
+fi
depend() {
need net
}
checkconfig() {
- if [ ! -e ${SETIATHOME_DIR} ]
+ if [ ! -e "${SETIATHOME_DIR}" ]
then
einfo "Creating ${SETIATHOME_DIR}"
- mkdir ${SETIATHOME_DIR}
+ mkdir "${SETIATHOME_DIR}"
fi
- if [ ! -e ${SETIATHOME_DIR}/user_info.sah ]
+ if [ ! -e "${SETIATHOME_DIR}/user_info.sah" ]
then
einfo "Setting up SETI@home for the first time"
- cd ${SETIATHOME_DIR}
- ./setiathome -login
+ cd "${SETIATHOME_DIR}"
+ /opt/setiathome/setiathome -login
fi
- if [ $cpus != '1' ]; then
+ if [ "${SETIATHOME_THREADS}" != '1' ]; then
cd ${SETIATHOME_DIR}
- for cpu in `seq 2 $cpus`; do
- if [ ! -e ${SETIATHOME_DIR}/cpu${cpu} ]; then
- mkdir ${SETIATHOME_DIR}/cpu${cpu}
- cp ${SETIATHOME_DIR}/* ${SETIATHOME_DIR}/cpu${cpu} > /dev/null
- rm ${SETIATHOME_DIR}/cpu${cpu}/*.sah > /dev/null
- cp ${SETIATHOME_DIR}/user_info.sah ${SETIATHOME_DIR}/cpu${cpu}
- fi
+ for thread in `seq 2 "${SETIATHOME_THREADS}"`; do
+ if [ ! -e "${SETIATHOME_DIR}/thread${thread}" ]; then
+ mkdir "${SETIATHOME_DIR}/thread${thread}"
+ cp "${SETIATHOME_DIR}/user_info.sah" "${SETIATHOME_DIR}/thread${thread}" fi
+ fi
done
fi
}
@@ -36,20 +36,19 @@ checkconfig() {
start() {
checkconfig
-
- if [ $cpus = '1' ]; then
+ if [ "${SETIATHOME_THREADS}" = '1' ]; then
ebegin "Starting SETI@home"
else
- ebegin "Starting SETI@home ($cpus processors)"
+ ebegin "Starting SETI@home (${SETIATHOME_THREADS} threads)"
fi
- for cpu in `seq 1 $cpus`; do
- cd ${SETIATHOME_DIR}
- if [ $cpu != '1' ]; then
- cd cpu${cpu}
- fi
+ for thread in `seq 1 "${SETIATHOME_THREADS}"`; do
+ cd "${SETIATHOME_DIR}"
+ if [ "${thread}" != '1' ]; then
+ cd "thread${thread}"
+ fi
- ./setiathome ${SETIATHOME_OPTIONS} >&/dev/null&
+ /opt/setiathome/setiathome ${SETIATHOME_OPTIONS} >&/dev/null&
done
eend $?
diff --git a/app-sci/setiathome/setiathome-3.08-r1.ebuild b/app-sci/setiathome/setiathome-3.08-r1.ebuild
new file mode 100644
index 000000000000..04e0f41bbfdb
--- /dev/null
+++ b/app-sci/setiathome/setiathome-3.08-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-sci/setiathome/setiathome-3.08-r1.ebuild,v 1.1 2003/05/04 13:36:48 aliz Exp $
+
+IUSE="X"
+
+S="${WORKDIR}/${P}"
+
+# Don't know if this is necessary, will have to check the license
+RESTRICT="nomirror"
+
+# no version number on this install dir since upgrades will be using same dir
+# (data will be stored here too)
+I=/opt/setiathome
+
+# 3.08 has not yet been released for ppc, sparc or alpha.
+
+SRC_URI="x86? ( http://wcarchive.cdrom.com/pub/setiathome/setiathome-${PV}.i686-pc-linux-gnu.tar
+ ftp://alien.ssl.berkeley.edu/pub/setiathome-${PV}.i686-pc-linux-gnu.tar )"
+# ppc? ( http://wcarchive.cdrom.com/pub/setiathome/setiathome-${PV}.powerpc-unknown-linux-gnu.tar
+# ftp://alien.ssl.berkeley.edu/pub/setiathome-${PV}.powerpc-unknown-linux-gnu.tar )
+# sparc? ( http://wcarchive.cdrom.com/pub/setiathome/setiathome-${PV}.sparc-unknown-linux-gnu.tar
+# ftp://alien.ssl.berkeley.edu/pub/setiathome-${PV}.sparc-unknown-linux-gnu.tar )
+# alpha? ( http://wcarchive.cdrom.com/pub/setiathome/setiathome-${PV}.alpha-unknown-linux-gnu.tar
+# ftp://alien.ssl.berkeley.edu/pub/setiathome-3.03.alpha-unknown-linux-gnu.tar )"
+
+DESCRIPTION="Search for Extraterrestrial Intelligence (SETI) @ home"
+HOMEPAGE="http://setiathome.ssl.berkeley.edu"
+DEPEND=">=sys-apps/baselayout-1.8.0"
+RDEPEND="X? ( x11-base/xfree )"
+
+SLOT="0"
+LICENSE="as-is"
+KEYWORDS="~x86 -ppc -sparc -alpha"
+
+src_unpack () {
+ cd ${WORKDIR}
+ unpack ${A}
+
+ # find real directory ...
+ dir="`find . -type d -name "${P}*" -mindepth 1 -maxdepth 1 | \
+ cut -b "3-"`"
+ # ... and rename it to our desired directory name
+ mv "${dir}" "${P}"
+}
+
+src_install () {
+ dodir ${I} /var/lib/setiathome
+ cp {setiathome,README} ${D}/${I}
+ use X && cp {xsetiathome,README.xsetiathome} ${D}/${I}
+ chown nobody.nogroup ${D}/${I}
+ chown nobody.nogroup ${D}/${I}/setiathome
+ chmod +s ${S}/setiathome
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/seti-init.d-r1 setiathome
+ insinto /etc/conf.d ; newins ${FILESDIR}/seti-conf.d-r1 setiathome
+ echo "SETIATHOME_DIR=${I}">> ${D}/etc/conf.d/setiathome
+}
+
+pkg_postinst () {
+ einfo "To run SETI@home in the background at boot:"
+ einfo " Edit /etc/conf.d/setiathome to setup"
+ einfo " Then just run \`/etc/init.d/setiathome start\`"
+ einfo ""
+ einfo "Otherwise remember to cd into the directory"
+ einfo "where it should keep its data files first, like so:"
+ einfo " cd /var/lib/setiathome && ${I}/setiathome"
+ einfo ""
+ einfo "As of 3.08-r1 data files has moved to /var/lib/setiathome"
+}
+
+pkg_postrm () {
+ einfo "SETI@home data files were not removed."
+ einfo " Remove them manually from /var/lib/setiathome"
+}