summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Brueckner <darks@gentoo.org>2001-08-06 11:53:48 +0000
committerHolger Brueckner <darks@gentoo.org>2001-08-06 11:53:48 +0000
commit29f8bf672b66d68863dc19bae2a6518c5a6bf88e (patch)
tree478a9b21eab544d4cfbcd6a746dc3a60545d9705 /net-www/zope
parentjust a rename of the ebuild to use latest version (diff)
downloadgentoo-2-29f8bf672b66d68863dc19bae2a6518c5a6bf88e.tar.gz
gentoo-2-29f8bf672b66d68863dc19bae2a6518c5a6bf88e.tar.bz2
gentoo-2-29f8bf672b66d68863dc19bae2a6518c5a6bf88e.zip
added support for zeo server, activated with use flag zeo
Diffstat (limited to 'net-www/zope')
-rw-r--r--net-www/zope/files/digest-zope-2.4.01
-rw-r--r--net-www/zope/files/zope69
-rw-r--r--net-www/zope/zope-2.4.0.ebuild29
3 files changed, 73 insertions, 26 deletions
diff --git a/net-www/zope/files/digest-zope-2.4.0 b/net-www/zope/files/digest-zope-2.4.0
index 88acd9059751..7e512d26b9a4 100644
--- a/net-www/zope/files/digest-zope-2.4.0
+++ b/net-www/zope/files/digest-zope-2.4.0
@@ -1 +1,2 @@
MD5 1a41e096a80411bccf61cd862bc3cc20 Zope-2.4.0-src.tgz
+MD5 f9477321903f2127abf897d74c3a1457 ZEO-1.0b3.tgz
diff --git a/net-www/zope/files/zope b/net-www/zope/files/zope
index b84f1eae3eea..38807fcbac55 100644
--- a/net-www/zope/files/zope
+++ b/net-www/zope/files/zope
@@ -8,11 +8,18 @@
. /etc/rc.d/config/functions
+USEZEO="`/usr/lib/portage/bin/use zeo`"
+
SERVICE=zope
opts="start stop restart status"
export INSTANCE_HOME=/var/lib/zope
export INSTANCE_NAME=`basename ${INSTANCE_HOME}`
+export ZOPE_HOME=/usr/share/zope
+export ZOPE_PORT=8080
+export ZOPE_LOG="/var/log/zope"
+export ZEO_SERVER_PORT=5800
+export ZEO_SERVER_NAME="localhost"
ZOPE_PCGI="no"
@@ -29,35 +36,51 @@ ZOPE_PCGI="no"
#export ZSYSLOG_SERVER="localhost:514"
start_zope() {
- (
+
cd ${INSTANCE_HOME}
if [ $ZOPE_PCGI = "yes" ] ; then
/usr/bin/env python z2.py \
-p $INSTANCE_HOME/Zope.cgi \
- -u root \
- -z /usr/share/zope \
+ -u nobody \
+ -z $ZOPE_HOME \
-Z /var/run/zwatchdog.pid \
-w '' \
-f 8021 \
-m '' \
- -l /var/log/zope \
+ -l $ZOPE_LOG \
2>&1 >> /var/log/zope \
&
- else
- /usr/bin/env python z2.py \
- -u root \
- -z /usr/share/zope \
- -Z /var/run/zwatchdog.pid \
- -w 8080 \
- -f 8021 \
- -W 8023 \
- -m '' \
- -l /var/log/zope \
- -D \
- 2>&1 >> /var/log/zope \
- &
- fi
- )
+ else
+ if [ $USEZEO ]; then
+ /usr/bin/env python zctl.py start_zeo
+ /usr/bin/env python z2.py \
+ -u nobody \
+ -z $ZOPE_HOME \
+ -Z /var/run/zwatchdog.pid \
+ -w $ZOPE_PORT \
+ -f 8021 \
+ -W 8023 \
+ -m '' \
+ -l $ZOPE_LOG \
+ -D \
+ 2>&1 >> /var/log/zope \
+ &
+ else
+ /usr/bin/env python z2.py \
+ -u nobody \
+ -z $ZOPE_HOME \
+ -Z /var/run/zwatchdog.pid \
+ -w $ZOPE_PORT \
+ -f 8021 \
+ -W 8023 \
+ -m '' \
+ -l $ZOPE_LOG \
+ -D \
+ 2>&1 >> /var/log/zope \
+ &
+ fi
+ fi
+
}
# A function to find the pid of a program. We cannot use checkproc,
@@ -144,12 +167,15 @@ start() {
eend $ret "Error starting $SERVICE"
}
stop(){
- ebegin "Shutting down zope"
+ ebegin "Shutting down zope"
pid=`pidofproc zwatchdog`
[ -n "$pid" ] && (kill $pid 2>&1 >/dev/null)
pid=`pidofproc zserver`
[ -n "$pid" ] && (kill $pid 2>&1 >/dev/null)
rm -f ${INSTANCE_HOME}/var/Z2.pid /var/run/zwatchdog.pid
+ if [ $USEZEO ]; then
+ /usr/bin/env python ${INSTANCE_HOME}/zctl.py stop_zeo
+ fi
eend $? "Error stopping $SERVICE"
}
@@ -162,6 +188,9 @@ status(){
echo "Checking for zope: "
chkstatus zwatchdog
chkstatus zserver
+ if [ $USEZEO ]; then
+ /usr/bin/env python ${INSTANCE_HOME}/zctl.py status
+ fi
}
doservice ${@}
diff --git a/net-www/zope/zope-2.4.0.ebuild b/net-www/zope/zope-2.4.0.ebuild
index d634fd75cdda..ad84e6680fc7 100644
--- a/net-www/zope/zope-2.4.0.ebuild
+++ b/net-www/zope/zope-2.4.0.ebuild
@@ -1,12 +1,13 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Holger Brueckner <darks@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/net-www/zope/zope-2.4.0.ebuild,v 1.1 2001/08/05 21:23:11 darks Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/zope/zope-2.4.0.ebuild,v 1.2 2001/08/06 11:53:48 darks Exp $
-A="Zope-${PV}-src.tgz"
+A="Zope-${PV}-src.tgz ZEO-1.0b3.tgz"
S=${WORKDIR}/Zope-${PV}-src
DESCRIPTION="Zope is web application platform used for building high-performance, dynamic web sites."
-SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-src.tgz"
+SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-src.tgz
+ http://www.zope.org/Products/ZEO/ZEO-1.0b3.tgz"
HOMEPAGE="http://www.zope.org"
DEPEND="virtual/glibc
@@ -16,10 +17,16 @@ RDEPEND=">=dev-lang/python-2.1"
src_unpack() {
unpack Zope-${PV}-src.tgz
+
+ if [ "`use zeo`" ]; then
+ cd ${S}/lib/python
+ unpack ZEO-1.0b3.tgz
+ mv ZEO-1.0b3/ZEO ${S}/lib/python
+ rm -rf ZEO-1.0b3
+ fi
}
src_compile() {
-
try python w_pcgi.py
}
@@ -52,16 +59,22 @@ src_install () {
fperms a+x ${ZDIR}/lib/python/ZPublisher/Client.py
dodir ${ZVAR}
- insinto ${ZVAR}/var
+ insinto ${ZVAR}
doins z2.py
+ insinto ${ZVAR}/var
insopts -m644
doins var/Data.fs.in
dodir ${ZVAR}/Extensions
dodir ${ZVAR}/import
dodir ${ZVAR}/Products
+ if [ "`use zeo`" ]; then
+ insinto ${ZVAR}
+ doins ${FILESDIR}/zctl.py ${FILESDIR}/zope ${FILESDIR}/zope.conf ${FILESDIR}/custom_zodb.py
+ fi
+
exeinto ${ZDIR}
- doexe zpasswd.py start stop Zope.cgi
+ doexe zpasswd.py Zope.cgi
cd ${D}${ZDIR}
sed -e "s:${WORKDIR}:${ZDIR}:g" Zope.cgi > Zope.cgi.tmp
@@ -91,6 +104,10 @@ pkg_postinst() {
echo "You must run"
echo
echo /usr/share/zope/zpasswd.py /var/lib/zope/inituser
+ if [ "`use zeo`" ]; then
+ echo and edit /var/lib/zope/zope.conf
+ fi
+
echo
echo before you can start zope
fi