summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Wendel <lanius@gentoo.org>2004-01-21 21:22:00 +0000
committerHeinrich Wendel <lanius@gentoo.org>2004-01-21 21:22:00 +0000
commit63f500002279ba4b3998f60e9ab115c3580afe3e (patch)
treedd0c17c82d19f122646b626d7a2c14c00feeafe2 /net-zope
parentversion bump; added slot; added i18n stx patch (diff)
downloadgentoo-2-63f500002279ba4b3998f60e9ab115c3580afe3e.tar.gz
gentoo-2-63f500002279ba4b3998f60e9ab115c3580afe3e.tar.bz2
gentoo-2-63f500002279ba4b3998f60e9ab115c3580afe3e.zip
version bump; added slot; added i18n stx patch
Diffstat (limited to 'net-zope')
-rw-r--r--net-zope/zope/ChangeLog11
-rw-r--r--net-zope/zope/Manifest10
-rw-r--r--net-zope/zope/files/digest-zope-2.6.4_rc11
-rw-r--r--net-zope/zope/files/i18n-1.0.0.patch184
-rw-r--r--net-zope/zope/zope-2.4.0-r6.ebuild4
-rw-r--r--net-zope/zope/zope-2.5.1.ebuild4
-rw-r--r--net-zope/zope/zope-2.6.3.ebuild4
-rw-r--r--net-zope/zope/zope-2.6.4_rc1.ebuild165
8 files changed, 371 insertions, 12 deletions
diff --git a/net-zope/zope/ChangeLog b/net-zope/zope/ChangeLog
index ef4fd706a28d..ab6f1e516dce 100644
--- a/net-zope/zope/ChangeLog
+++ b/net-zope/zope/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-zope/zope
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/ChangeLog,v 1.13 2004/01/17 18:25:40 lanius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/ChangeLog,v 1.14 2004/01/21 21:21:49 lanius Exp $
+
+*zope-2.6.4_rc1 (21 Jan 2004)
+
+ 21 Jan 2004; Heinrich Wendel <lanius@gentoo.org> zope-2.4.0-r6.ebuild,
+ zope-2.5.1.ebuild, zope-2.6.3.ebuild, zope-2.6.4_rc1.ebuild,
+ files/i18n-1.0.0.patch:
+ version bump
+ added slot
+ added i18n stx patch
*zope-2.6.3 (17 Jan 2004)
diff --git a/net-zope/zope/Manifest b/net-zope/zope/Manifest
index 87023e05cc80..9e0e2bedb0d1 100644
--- a/net-zope/zope/Manifest
+++ b/net-zope/zope/Manifest
@@ -1,9 +1,9 @@
-MD5 2e27e4b469c628b0b2c8862b5f71c3e1 zope-2.4.0-r6.ebuild 2654
-MD5 c2d0ef81aede7eee932b2a18059753e3 zope-2.6.4_rc1.ebuild 4550
-MD5 6f52836b47ec3f2a231aa7151057f94d zope-2.5.1.ebuild 2618
-MD5 a910ce93752f52df1e29e16ad0d4d119 ChangeLog 4204
+MD5 445c27d961897aadd719c7d7d55abae8 zope-2.4.0-r6.ebuild 2653
+MD5 93204840c7159ef9f6cb4066bfa8c326 zope-2.6.4_rc1.ebuild 4550
+MD5 fe113b568060f9089f69b75e4848f897 zope-2.5.1.ebuild 2617
+MD5 61aa24171db8cc38d7fe1ca2e297a09d ChangeLog 4449
MD5 7890d88c5c6d189fbe6b187a3ebb6532 metadata.xml 161
-MD5 b32cb350e84c37ce91929b481afaf703 zope-2.6.3.ebuild 4360
+MD5 dcc157ad792206e2d516ab9b18aa72fe zope-2.6.3.ebuild 4360
MD5 e13da78ee330353cc967bea9589d1043 files/zope 5577
MD5 1120fc7faab07c95ecbf5834da87cff2 files/digest-zope-2.6.4_rc1 68
MD5 111f2aacb074731c923a5eb93a53f6af files/zctl.py 9455
diff --git a/net-zope/zope/files/digest-zope-2.6.4_rc1 b/net-zope/zope/files/digest-zope-2.6.4_rc1
new file mode 100644
index 000000000000..61b4af299f01
--- /dev/null
+++ b/net-zope/zope/files/digest-zope-2.6.4_rc1
@@ -0,0 +1 @@
+MD5 debbd78f86299d361b86587c8c63b337 Zope-2.6.4-rc1-src.tgz 2396218
diff --git a/net-zope/zope/files/i18n-1.0.0.patch b/net-zope/zope/files/i18n-1.0.0.patch
new file mode 100644
index 000000000000..9cbf0ba65ee2
--- /dev/null
+++ b/net-zope/zope/files/i18n-1.0.0.patch
@@ -0,0 +1,184 @@
+? encode.diff
+? i18n-0.9.9.patch
+? i18n-1.0.0.patch
+? i18n.patch
+? run_tests
+? test.diff
+Index: ClassicStructuredText.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/ClassicStructuredText.py,v
+retrieving revision 1.1.1.2
+retrieving revision 1.1.1.1.2.1
+diff -u -r1.1.1.2 -r1.1.1.1.2.1
+Index: DocumentClass.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/DocumentClass.py,v
+retrieving revision 1.1.1.1
+diff -u -r1.1.1.1 DocumentClass.py
+--- DocumentClass.py 15 Apr 2003 15:13:52 -0000 1.1.1.1
++++ DocumentClass.py 9 Nov 2003 18:02:30 -0000
+@@ -789,7 +789,7 @@
+
+ def doc_literal(
+ self, s,
+- expr = re.compile(r"(\W+|^)'([%s%s%s\s]+)'([%s]+|$)" % (letters, digits, literal_punc, phrase_delimiters)).search,):
++ expr = re.compile(r"(\W+|^)'((?:\w|[%s%s\s])+)'([%s]+|$)" % (digits, literal_punc, phrase_delimiters), re.U).search,):
+
+ # old expr... failed to cross newlines.
+ # expr=re.compile(
+@@ -807,7 +807,9 @@
+
+ def doc_emphasize(
+ self, s,
+- expr = re.compile(r'\*([%s%s%s\s]+?)\*' % (letters, digits, strongem_punc)).search
++ # i18nal variant
++ expr = re.compile(r'\*((?:\w|[%s\s])+?)\*' % (strongem_punc), re.U).search
++ #expr = re.compile(r'\*([%s%s%s\s]+?)\*' % (letters, digits, strongem_punc)).search
+ #expr = re.compile(r'\s*\*([ \n\r%s0-9.:/;,\'\"\?\-\_\/\=\-\>\<\(\)]+)\*(?!\*|-)' % letters).search # old expr, inconsistent punctuation
+ ):
+
+@@ -853,7 +855,7 @@
+
+ def doc_underline(self,
+ s,
+- expr=re.compile(r'_([%s%s%s\s]+)_([\s%s]|$)' % (letters, digits, under_punc,phrase_delimiters)).search):
++ expr=re.compile(r'_((?:\w|[%s\s])+)_([\s%s]|$)' % (under_punc,phrase_delimiters), re.U).search):
+
+ result = expr(s)
+ if result:
+@@ -867,7 +869,7 @@
+
+ def doc_strong(self,
+ s,
+- expr = re.compile(r'\*\*([%s%s%s\s]+?)\*\*' % (letters, digits, strongem_punc)).search
++ expr = re.compile(r'\*\*((?:\w|[%s%s\s])+?)\*\*' % (digits, strongem_punc), re.U).search
+ #expr = re.compile(r'\s*\*\*([ \n\r%s0-9.:/;,\'\"\?\-\_\/\=\-\>\<\(\)]+)\*\*(?!\*|-)' % letters).search, # old expr, inconsistent punc, failed to cross newlines.
+ ):
+
+@@ -879,7 +881,7 @@
+ return None
+
+ ## Some constants to make the doc_href() regex easier to read.
+- _DQUOTEDTEXT = r'("[ %s0-9\n\r%s]+")' % (letters,dbl_quoted_punc) ## double quoted text
++ _DQUOTEDTEXT = r'("[^"]+")'
+ _ABSOLUTE_URL=r'((http|https|ftp|mailto|file|about)[:/]+?[%s0-9_\@\.\,\?\!\/\:\;\-\#\~\=\&\%%\+]+)' % letters
+ _ABS_AND_RELATIVE_URL=r'([%s0-9_\@\.\,\?\!\/\:\;\-\#\~\=\&\%%\+]+)' % letters
+
+@@ -887,12 +889,12 @@
+
+
+ def doc_href1(self, s,
+- expr=re.compile(_DQUOTEDTEXT + "(:)" + _ABS_AND_RELATIVE_URL + _SPACES).search
++ expr=re.compile(_DQUOTEDTEXT + "(:)" + _ABS_AND_RELATIVE_URL + _SPACES, re.U).search
+ ):
+ return self.doc_href(s, expr)
+
+ def doc_href2(self, s,
+- expr=re.compile(_DQUOTEDTEXT + r'(\,\s+)' + _ABSOLUTE_URL + _SPACES).search
++ expr=re.compile(_DQUOTEDTEXT + r'(\,\s+)' + _ABSOLUTE_URL + _SPACES, re.U).search
+ ):
+ return self.doc_href(s, expr)
+
+Index: DocumentWithImages.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/DocumentWithImages.py,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- DocumentWithImages.py 15 Apr 2003 15:13:52 -0000 1.1.1.1
++++ DocumentWithImages.py 15 Apr 2003 15:16:25 -0000 1.2
+@@ -30,12 +30,12 @@
+
+ def doc_img(
+ self, s,
+- expr1=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\_\-.:/;,\n\~]+)').search,
+- expr2=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\_\-.:/;,\n\~]+):([a-zA-Z0-9_\-.:/;,\n\~]+)').search
++ expr1=re.compile('\"((?:\w|[ *.:/;,\-\n\~])+)\":img:([a-zA-Z0-9\_\-.:/;,\n\~]+)', re.U).search,
++ expr2=re.compile('\"((?:\w|[ *.:/;,\-\n\~])+)\":img:([a-zA-Z0-9\_\-.:/;,\n\~]+):([a-zA-Z0-9_\-.:/;,\n\~]+)', re.U).search
+ ):
+-
+ r = expr2(s)
+ if r:
++
+
+ # Warning: the regex are getting confused when the string after :img:
+ # is an URL containing ":" (Collector #2276)
+Index: HTMLClass.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/HTMLClass.py,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2.2.2
+diff -u -r1.1.1.1 -r1.2.2.2
+Index: ST.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/ST.py,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- ST.py 15 Apr 2003 15:13:53 -0000 1.1.1.1
++++ ST.py 15 Apr 2003 15:16:25 -0000 1.2
+@@ -115,6 +115,9 @@
+ Structure => [paragraph,[sub-paragraphs]]
+ """
+
++ if type(paragraphs) == type(''):
++ paragraphs = unicode(paragraphs, 'utf-8')
++
+ currentlevel = 0
+ currentindent = 0
+ levels = {0:0}
+Index: Zwiki.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/Zwiki.py,v
+retrieving revision 1.1.1.2
+retrieving revision 1.1.1.1.2.1
+diff -u -r1.1.1.2 -r1.1.1.1.2.1
+Index: test.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/test.py,v
+retrieving revision 1.1.1.1
+retrieving revision 1.1.2.1
+diff -u -r1.1.1.1 -r1.1.2.1
+Index: tests/__init__.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/tests/__init__.py,v
+retrieving revision 1.1.1.1
+retrieving revision 1.1.2.1
+diff -u -r1.1.1.1 -r1.1.2.1
+Index: tests/testStructuredText.py
+===================================================================
+RCS file: /var/lib/cvs/nkm/zope/StructuredText/tests/testStructuredText.py,v
+retrieving revision 1.1.1.1
+retrieving revision 1.1.1.1.2.3
+diff -u -r1.1.1.1 -r1.1.1.1.2.3
+--- tests/testStructuredText.py 15 Apr 2003 15:13:56 -0000 1.1.1.1
++++ tests/testStructuredText.py 7 Nov 2003 12:12:32 -0000 1.1.1.1.2.3
+@@ -210,13 +210,22 @@
+ '<code>"literal":http://www.zope.org/.</code>')
+
+
+- def XXXtestUnicodeContent(self):
+- # This fails because ST uses the default locale to get "letters"
+- # whereas it should use \w+ and re.U if the string is Unicode.
+- #self._test(u"h\xe9 **y\xe9** xx",
+- # u"h\xe9 <strong>y\xe9</strong> xx")
+- pass
++ def testUnicodeContent(self):
++ self._test(u"h\xe9 **y\xe9** xx",
++ u"h\xe9 <strong>y\xe9</strong> xx")
++ self._test(u"h\xe9 *y\xe9* xx",
++ u"h\xe9 <em>y\xe9</em> xx")
++ self._test(u"h\xe9 _y\xe9_ xx",
++ u"h\xe9 <u>y\xe9</u> xx")
++ self._test(u"h\xe9 'y\xe9' xx",
++ u"h\xe9 <code>y\xe9</code> xx")
++ self._test(u"h\xe9 \"y\xe9\":http://zope.org xx",
++ u"h\xe9 <a href=\"http://zope.org\">y\xe9</a> xx")
+
++ def testDoNotHang(self):
++ raw_str = 'UAB "Vita Baltic International" produkcijos asortiment\u0105 papild\u0117 dar trys specifines nedegumo savybes turin\u010dios porolono ru\u0161ys. \nSpalio m\u0117nes\u012f buvo gauti tarptautiniai sertifikatai, liudijantys, kad porolonai CV 3037, CV 3538 ir CV 2533 atitinka degumo standart\u0173 BS 5852:Part 2: 1982 reikalavimus. Tai labai gera \u017einia bald\u0173 gamintojams, gaminantiems baldus ir \u010diu\u017einius,\nkuri\u0173 gaminiams keliami ypatingi importuotoj\u0173 reikalavimai.'
++ res_txt = raw_str
++ self._test(raw_str, res_txt)
+
+ def test_suite():
+ suite = unittest.TestSuite()
diff --git a/net-zope/zope/zope-2.4.0-r6.ebuild b/net-zope/zope/zope-2.4.0-r6.ebuild
index f66afce1816f..04b628513f11 100644
--- a/net-zope/zope/zope-2.4.0-r6.ebuild
+++ b/net-zope/zope/zope-2.4.0-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.4.0-r6.ebuild,v 1.6 2004/01/05 23:27:21 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.4.0-r6.ebuild,v 1.7 2004/01/21 21:21:49 lanius Exp $
S=${WORKDIR}/Zope-${PV}-src
DESCRIPTION="Zope is web application platform used for building high-performance, dynamic web sites."
@@ -12,7 +12,7 @@ DEPEND="virtual/glibc
=dev-lang/python-2.1*"
RDEPEND="=dev-lang/python-2.1*"
KEYWORDS="x86 sparc "
-SLOT="0"
+SLOT="${PV}"
LICENSE="as-is"
src_unpack() {
diff --git a/net-zope/zope/zope-2.5.1.ebuild b/net-zope/zope/zope-2.5.1.ebuild
index 93d0c7ebeead..ba7786cd2403 100644
--- a/net-zope/zope/zope-2.5.1.ebuild
+++ b/net-zope/zope/zope-2.5.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.5.1.ebuild,v 1.6 2004/01/05 23:27:21 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.5.1.ebuild,v 1.7 2004/01/21 21:21:49 lanius Exp $
S=${WORKDIR}/Zope-${PV}-src
DESCRIPTION="Zope is web application platform used for building high-performance, dynamic web sites."
@@ -10,7 +10,7 @@ HOMEPAGE="http://www.zope.org"
DEPEND="virtual/glibc
=dev-lang/python-2.1.3*"
-SLOT="0"
+SLOT="${PV}"
LICENSE="as-is"
KEYWORDS="x86 sparc "
diff --git a/net-zope/zope/zope-2.6.3.ebuild b/net-zope/zope/zope-2.6.3.ebuild
index 58114ac1daba..d91d38732bde 100644
--- a/net-zope/zope/zope-2.6.3.ebuild
+++ b/net-zope/zope/zope-2.6.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.6.3.ebuild,v 1.1 2004/01/17 18:25:40 lanius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.6.3.ebuild,v 1.2 2004/01/21 21:21:49 lanius Exp $
inherit eutils
@@ -10,7 +10,7 @@ DESCRIPTION="Zope is a web application platform used for building high-performan
HOMEPAGE="http://www.zope.org"
SRC_URI="http://www.zope.org/Products/Zope/${PV}/Zope-${PV}-src.tgz"
LICENSE="ZPL"
-SLOT="0"
+SLOT="${PV}"
KEYWORDS="x86 ~sparc"
diff --git a/net-zope/zope/zope-2.6.4_rc1.ebuild b/net-zope/zope/zope-2.6.4_rc1.ebuild
new file mode 100644
index 000000000000..cf6e884dade2
--- /dev/null
+++ b/net-zope/zope/zope-2.6.4_rc1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-2.6.4_rc1.ebuild,v 1.1 2004/01/21 21:21:49 lanius Exp $
+
+inherit eutils
+
+MY_PV=${PV/_/-}
+
+S="${WORKDIR}/Zope-${MY_PV}-src"
+
+DESCRIPTION="Zope is a web application platform used for building high-performance, dynamic web sites."
+HOMEPAGE="http://www.zope.org"
+SRC_URI="http://www.zope.org/Products/Zope/2.6.4rc1/Zope-${MY_PV}-src.tgz"
+LICENSE="ZPL"
+SLOT="${PV}"
+
+KEYWORDS="~x86 ~sparc"
+
+# This is for developers that wish to test Zope with virtual/python.
+# If this is a problem, let me know right away. --kutsuya@gentoo.org
+# I wondering if we need a USE flag for this. But I'm planning to have
+# a private environmental variable called PYTHON_SLOT_VERSION set in
+# ebuilds to build extensions for python2.1.
+
+if [ "${PYTHON_SLOT_VERSION}" = 'VIRTUAL' ] ; then
+ RDEPEND="virtual/python"
+ python='python'
+elif [ "${PYTHON_SLOT_VERSION}" != '' ] ; then
+ RDEPEND="=dev-lang/python-${PYTHON_SLOT_VERSION}*"
+ python="python${PYTHON_SLOT_VERSION}"
+else
+ RDEPEND="=dev-lang/python-2.1.3*"
+ python='python2.1'
+fi
+
+RDEPEND="${RDEPEND}
+ !net-zope/verbosesecurity"
+
+DEPEND="${RDEPEND}
+ virtual/glibc
+ >=sys-apps/sed-4.0.5
+ >=app-admin/zope-config-0.3"
+
+ZUID=zope
+ZGID=$(echo ${P} |sed -e "s:\.:_:g")
+ZS_DIR=${ROOT}/usr/share/zope/
+ZI_DIR=${ROOT}/var/lib/zope/
+ZSERVDIR=${ZS_DIR}/${PF}/
+ZINSTDIR=${ZI_DIR}/${ZGID}
+CONFDIR=${ROOT}/etc/conf.d/
+RCNAME=zope.initd
+
+# Narrow the scope of ownership/permissions.
+# Security plan:
+# * ZUID is the superuser for all zope instances.
+# * ZGID is for a single instance's administration.
+# * Other's should not have any access to ${ZSERVDIR},
+# because they can work through the Zope web interface.
+# This should protect our code/data better.
+
+# Parameters:
+# $1 = instance directory
+# $2 = group
+
+setup_security() {
+ chown -R ${ZUID}:${2} ${1}
+ chmod -R g+u ${1}
+ chmod -R o-rwx ${1}
+}
+
+install_help() {
+ einfo "Need to setup an inituser (admin) before executing zope:"
+ einfo "\tzope-config --zpasswd"
+ einfo "To execute default Zope instance:"
+ einfo "\t/etc/init.d/${ZGID} start"
+}
+
+pkg_setup() {
+ if [ "${PYTHON_SLOT_VERSION}" != '' ] ; then
+ ewarn "WARNING: You set PYTHON_SLOT_VERSION=${PYTHON_SLOT_VERSION}."
+ if [ "${PYTHON_SLOT_VERSION}" = 'VIRTUAL' ] ; then
+ ewarn "So this ebuild will use virtual/python."
+ else
+ ewarn "So this ebuild will use python-${PYTHON_SLOT_VERSION}*."
+ fi
+ ewarn "Zope Corp. only recommends using python-2.1.3 "
+ ewarn "with this version of zope. Emerge at your own risk."
+ ewarn "Python-2.3 is known NOT to work."
+ sleep 12
+ fi
+ enewgroup ${ZGID}
+ enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID}
+}
+
+src_unpack() {
+ unpack ${A}
+ einfo "Patching structured text"
+ cd ${S}/lib/python/StructuredText/
+ epatch ${FILESDIR}/i18n-1.0.0.patch
+}
+
+src_compile() {
+ $python wo_pcgi.py || die "Failed to compile."
+}
+
+src_install() {
+ dodoc LICENSE.txt README.txt
+ docinto doc ; dodoc doc/*.txt
+ docinto doc/PLATFORMS ; dodoc doc/PLATFORMS/*
+ docinto doc/changenotes ; dodoc doc/changenotes/*
+
+ # using '/etc/init.d/zope'
+ rm -Rf start stop LICENSE.txt README.txt doc/
+
+ # Need to rip out the zinstance stuff out
+ # but save as templates
+ mkdir -p .templates/import
+ cp import/README.txt .templates/import/
+ mv -f Extensions/ .templates/
+ mv -f var/ .templates/
+
+ # Add conf.d script.
+ dodir /etc/conf.d
+ cp ${FILESDIR}/2.6.1/zope.envd .templates/zope.confd
+
+ # Fill in environmental variables
+ sed -i \
+ -e "/ZOPE_OPTS=/ c\\ZOPE_OPTS=${ZOPEOPTS}\\ " \
+ -e "/ZOPE_HOME=/ c\\ZOPE_HOME=${ZSERVDIR}\\ " \
+ -e "/SOFTWARE_HOME=/ c\\SOFTWARE_HOME=${ZSERVDIR}/lib/python\\ " \
+ .templates/zope.confd
+
+ # Add rc-script.
+ #!! TODO: fill in $python in zope-r2.initd
+ sed -e "/python=/ c\\python=\"${python}\"\\ " ${FILESDIR}/2.6.1/${RCNAME} \
+ > .templates/zope.initd
+
+ # Copy the remaining contents of ${S} into the ${D}.
+ dodir ${ZSERVDIR}
+ cp -a . ${D}${ZSERVDIR}
+
+ setup_security ${D}${ZSERVDIR} ${ZGID}
+}
+
+pkg_postinst() {
+ # Here we add our default zope instance.
+ /usr/sbin/zope-config --zserv=${ZSERVDIR} --zinst=${ZINSTDIR} \
+ --zgid=${ZGID}
+ install_help
+}
+
+pkg_postrm() {
+ # rcscripts and conf.d files will remain. i.e. /etc protection.
+
+ # Delete .default if this ebuild is the default. zprod-manager will
+ # have to handle a missing default;
+ local VERSION_DEF="$(zope-config --zidef-get)"
+ if [ "${ZGID}" = "$VERSION_DEF" ] ; then
+ rm -f ${ZI_DIR}/.default
+ fi
+}
+
+pkg_config() {
+ install_help
+}