diff options
author | Heinrich Wendel <lanius@gentoo.org> | 2003-12-10 19:08:16 +0000 |
---|---|---|
committer | Heinrich Wendel <lanius@gentoo.org> | 2003-12-10 19:08:16 +0000 |
commit | 391c7b7b90a29465e983670fa9a657e6fcebbd6c (patch) | |
tree | 757966b3642f9e99114346e21abd01051b53194a /net-zope | |
parent | added support for specifying python version, (diff) | |
download | historical-391c7b7b90a29465e983670fa9a657e6fcebbd6c.tar.gz historical-391c7b7b90a29465e983670fa9a657e6fcebbd6c.tar.bz2 historical-391c7b7b90a29465e983670fa9a657e6fcebbd6c.zip |
added support for specifying python version,
Diffstat (limited to 'net-zope')
-rw-r--r-- | net-zope/zope/Manifest | 4 | ||||
-rw-r--r-- | net-zope/zope/files/digest-zope-2.6.2-r1 | 1 | ||||
-rw-r--r-- | net-zope/zope/zope-2.6.2-r1.ebuild | 152 |
3 files changed, 155 insertions, 2 deletions
diff --git a/net-zope/zope/Manifest b/net-zope/zope/Manifest index 87e805cd228e..b4e3d0a64690 100644 --- a/net-zope/zope/Manifest +++ b/net-zope/zope/Manifest @@ -1,9 +1,9 @@ -MD5 4f0fb94a42fd046ec3a95f2d237d04a5 zope-2.6.2-r1.ebuild 4312 +MD5 baba13fa15d3b4b4a554792d03c280a3 zope-2.6.2-r1.ebuild 4315 MD5 c3ebe912b17a673e13d5e3060922deee zope-2.4.0-r6.ebuild 2654 MD5 e950559e4827e9a8bc9b0fc13b22d7ba zope-2.6.2.ebuild 3970 MD5 4509cbc844e892ebbee71d651cb49f27 zope-2.5.1.ebuild 2618 MD5 222c7b7ea3d77a668e9bfa391339897e zope-2.6.1.ebuild 4178 -MD5 2e3a8f09bc6e9696b4e93344428bc0d1 ChangeLog 3510 +MD5 750363558a644b5cde431a6140bbeb4e ChangeLog 3510 MD5 7890d88c5c6d189fbe6b187a3ebb6532 metadata.xml 161 MD5 f8fdebc428a825403b6ecdd86d8454e1 files/zope 5574 MD5 111f2aacb074731c923a5eb93a53f6af files/zctl.py 9455 diff --git a/net-zope/zope/files/digest-zope-2.6.2-r1 b/net-zope/zope/files/digest-zope-2.6.2-r1 new file mode 100644 index 000000000000..058a602089fb --- /dev/null +++ b/net-zope/zope/files/digest-zope-2.6.2-r1 @@ -0,0 +1 @@ +MD5 a0e873d54994231d7c03640f7092a4fb Zope-2.6.2-src.tgz 2347004 diff --git a/net-zope/zope/zope-2.6.2-r1.ebuild b/net-zope/zope/zope-2.6.2-r1.ebuild new file mode 100644 index 000000000000..ced7c3a9b0c1 --- /dev/null +++ b/net-zope/zope/zope-2.6.2-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2003 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.2-r1.ebuild,v 1.1 2003/12/10 19:08:11 lanius Exp $ + +inherit eutils + +S="${WORKDIR}/Zope-${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/${PV}/Zope-${PV}-src.tgz" +LICENSE="ZPL" +SLOT="0" + +KEYWORDS="~x86 ~ppc ~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 + +DEPEND="virtual/glibc + >=sys-apps/sed-4.0.5" + +RDEPEND=">=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_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 + echo "ZOPE_OPTS=\"-u zope\"" | \ + cat - ${FILESDIR}/2.6.1/zope.envd > .templates/zope.confd + + # Fill in environmental variables + sed -i -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 +} |