summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Haegler <simon.haegler@mistafunk.ch>2012-03-05 00:15:15 +0100
committerSimon Haegler <simon.haegler@mistafunk.ch>2012-03-05 00:15:15 +0100
commit3a56f75c5ddf5984bb73f8893dc0a7b35b111917 (patch)
treee5ee7e747bf314d1e30c256d6d016c634027f72d
parentupdate to alembic 1.0.4 (diff)
downloadmistafunk-3a56f75c5ddf5984bb73f8893dc0a7b35b111917.tar.gz
mistafunk-3a56f75c5ddf5984bb73f8893dc0a7b35b111917.tar.bz2
mistafunk-3a56f75c5ddf5984bb73f8893dc0a7b35b111917.zip
yacy 1.02
-rw-r--r--net-misc/yacy/Manifest4
-rwxr-xr-xnet-misc/yacy/files/yacy-1.02.confd18
-rwxr-xr-xnet-misc/yacy/files/yacy-1.02.rc74
-rwxr-xr-xnet-misc/yacy/yacy-1.02.20120225.9000.ebuild47
4 files changed, 143 insertions, 0 deletions
diff --git a/net-misc/yacy/Manifest b/net-misc/yacy/Manifest
new file mode 100644
index 0000000..76461ac
--- /dev/null
+++ b/net-misc/yacy/Manifest
@@ -0,0 +1,4 @@
+AUX yacy-1.02.confd 396 RMD160 2e175bdda89b662f69451a43a356411bdb40c836 SHA1 204531543466e6e992f7ddbefc9a4ed175d95769 SHA256 d750007582e57672dcb4ddac4b0c843d3224debb2283f8d5a11435de05d21d62
+AUX yacy-1.02.rc 1574 RMD160 960f15b6a6edd79a0953f9f23ce83d5016f1611d SHA1 87d5eea118cd547b660470f651210bc0f5013a8e SHA256 9ee88a806e18aa1fb1345380cc97af78ca7a50099c2fb33e17b33ae2f854c253
+DIST yacy_v1.02_20120225_9000.tar.gz 25247547 RMD160 4efab15657cf223452a341171b0b6228f8ba7e45 SHA1 b478d2e17547a84aa145aeb10bdd6753f5a269b0 SHA256 6a6aa592c1ea4f5881474f82f16eda65de04bc008f868c8509298efbbe3fc205
+EBUILD yacy-1.02.20120225.9000.ebuild 1161 RMD160 227e5f15dd2110a76c46eb71cd54b46754e2e10f SHA1 31b1022772e279e1044e07a88aef98d27f56ea0d SHA256 387f8682730f42b0a9531c9e885da341a74296371fbb7656a0629bda507650ee
diff --git a/net-misc/yacy/files/yacy-1.02.confd b/net-misc/yacy/files/yacy-1.02.confd
new file mode 100755
index 0000000..32bf9eb
--- /dev/null
+++ b/net-misc/yacy/files/yacy-1.02.confd
@@ -0,0 +1,18 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# home-directory
+YACY_HOME="/opt/yacy"
+
+# user to run yacy as
+YACY_USER="yacy"
+
+# java options (optional)
+JAVA_OPTIONS="-Xmx600m -Xms180m"
+
+# niceness (optional)
+NICENESS="1"
+
+# wait on stop, should be maxWaitingWordFlush, see DATA/SETTINGS/httpProxy.conf
+WAIT_ON_STOP="180"
diff --git a/net-misc/yacy/files/yacy-1.02.rc b/net-misc/yacy/files/yacy-1.02.rc
new file mode 100755
index 0000000..9560fcd
--- /dev/null
+++ b/net-misc/yacy/files/yacy-1.02.rc
@@ -0,0 +1,74 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+cd $YACY_HOME
+
+JAVA="$(java-config --java)"
+
+JAVA_ARGS=""
+if [ -e DATA/SETTINGS/httpProxy.conf ] ; then
+ for i in $(grep javastart DATA/SETTINGS/httpProxy.conf); do
+ i="${i#javastart_*=}";
+ JAVA_ARGS=-$i" "$JAVA_ARGS;
+ done
+fi
+
+CLASSPATH=""
+test -e lib/ && for N in `ls -1 lib/*.jar`; do CLASSPATH="$CLASSPATH$N:"; done
+CLASSPATH="-classpath classes:htroot:$CLASSPATH"
+
+if [ -n "${NICENESS}" ] ; then
+ NICE="nice -n ${NICENESS}"
+fi
+
+#PORT="8090"
+
+start() {
+ ebegin "Starting YaCy"
+ ${NICE} sudo -u ${YACY_USER} ${JAVA} ${JAVA_OPTIONS} ${JAVA_ARGS} ${CLASSPATH} net.yacy.yacy &> /dev/null &
+ echo $! > /var/run/yacy.pid
+ sleep 1
+ ps ax|grep "^ *$(cat /var/run/yacy.pid)" > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Shutting down YaCy"
+ sudo -u ${YACY_USER} ${JAVA} ${JAVA_OPTIONS} ${JAVA_ARGS} ${CLASSPATH} net.yacy.yacy -shutdown &> /dev/null &
+ einfon "Waiting ."
+ cnt=0
+ while ( ps ax|grep "^ *$(cat /var/run/yacy.pid)" > /dev/null )
+ do
+ cnt=`expr $cnt + 2`
+ if [ $cnt -gt ${WAIT_ON_STOP} ] ; then
+ eend 1 "Failed."
+ exit
+ fi
+ sleep 2
+ echo -n "."
+ done
+ rm /var/run/yacy.pid
+ echo "done."
+ eend $?
+}
+
+status() {
+ if service_started "${myservice}" ; then
+ if ! ps p `cat /var/run/yacy.pid` &> /dev/null ; then
+ eerror "Service seems to be down"
+ return 1
+ fi
+ else
+ if [ -e /var/run/yacy.pid ]; then
+ eerror "Service seems to be running already"
+ return 1
+ fi
+ return 0
+ fi
+}
diff --git a/net-misc/yacy/yacy-1.02.20120225.9000.ebuild b/net-misc/yacy/yacy-1.02.20120225.9000.ebuild
new file mode 100755
index 0000000..2eaf239
--- /dev/null
+++ b/net-misc/yacy/yacy-1.02.20120225.9000.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $HEADER: $
+
+inherit eutils versionator
+
+MAJOR_PV="$(get_version_component_range 1-2)"
+REL_PV="$(get_version_component_range 3)"
+SVN_PV="$(get_version_component_range 4)"
+
+DESCRIPTION="YaCy - p2p based distributed web-search engine"
+HOMEPAGE="http://www.yacy.net/"
+SRC_URI="http://www.yacy.net/release/yacy_v${MAJOR_PV}_${REL_PV}_${SVN_PV}.tar.gz"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+DEPEND=">=virtual/jdk-1.6.0
+ app-admin/sudo"
+LICENSE="GPL-2"
+
+IUSE=""
+
+S="${WORKDIR}/yacy"
+
+src_install() {
+ dodir /opt
+ mv "${S}" "${D}/opt/yacy"
+ chown -R yacy:yacy "${D}/opt/yacy"
+
+ dodir /var/log/yacy
+ chown yacy:yacy "${D}/var/log/yacy"
+ dosed "s:DATA/LOG/:/var/log/yacy/:g" "/opt/yacy/yacy.logging"
+
+ exeinto /etc/init.d
+ newexe "${FILESDIR}/yacy-${MAJOR_PV}.rc" yacy
+ insinto /etc/conf.d
+ newins "${FILESDIR}/yacy-${MAJOR_PV}.confd" yacy
+}
+
+pkg_setup() {
+ enewgroup yacy
+ enewuser yacy -1 /bin/bash /opt/yacy yacy
+}
+
+pkg_postinst() {
+ einfo "yacy.logging will write logfiles into /var/log/yacy/"
+ einfo "To setup YaCy, open http://localhost:8090 in your browser."
+}