--- /home/smithhcl/proj/zope/zope-2.7.0.ebuild 2004-03-29 16:01:37.000000000 -0800 +++ /usr/local/portage/net-zope/zope/zope-2.7.0.ebuild 2004-05-07 00:21:38.329968376 -0700 @@ -35,6 +35,7 @@ ZGID=zope #$(echo ${P} |sed -e "s:\.:_:g") +REAL_DEST_DIR=/usr/lib/${PF} ZOPE_DIR=${D}usr/lib/${PF} #ZS_DIR=${ROOT}/opt/${PF} @@ -56,7 +57,6 @@ # Parameters: # $1 = instance directory # $2 = group - setup_security() { chown -R ${ZUID}:${2} ${1} chmod -R g+u ${1} @@ -71,19 +71,21 @@ #} src_unpack() { - unpack ${A} + unpack ${A} cd ${S} epatch ${FILESDIR}/${PV}/zdctl.patch sed -i -e "s/# effective-user chrism/effective-user ${ZUID}/" skel/etc/zope.conf.in - zuid=`grep ${ZUID} /etc/passwd | cut -d: -f3` - zgid=`grep ${ZGID} /etc/group | cut -d: -f3` + zuid=`grep "^${ZUID}:" /etc/passwd | cut -d: -f3` + zgid=`grep "^${ZGID}:" /etc/group | cut -d: -f3` sed -i -e "s/None, None,/${zuid}, ${zgid},/" utilities/mkzopeinstance.py } pkg_setup() { enewgroup ${ZGID} - enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID} + #enewuser ${ZUID} 261 /bin/bash ${ZS_DIR} ${ZGID} + #[cs] changed from bug report + enewuser ${ZUID} 261 /bin/bash ${ZOPE_DIR} ${ZGID} } src_compile() { @@ -158,8 +160,19 @@ # .templates/zope.initd + # if this were a normal init.d install, it would be: + #exeinto /etc/init.d + #newexe ${FILESDIR}/${PV}/zope.initd zope-${PV} + + dodir /etc/init.d + mkdir -p .templates/ + #echo current dir is `pwd` + #echo cp ${FILESDIR}/${PV}/zope.initd .templates/zope.initd + cp ${FILESDIR}/${PV}/zope.initd .templates/zope.initd + + dodir ${REAL_DEST_DIR} + cp -a .templates ${ZOPE_DIR} - #--test without this #setup_security ${D}${ZSERVDIR} ${ZGID} einstall @@ -192,13 +205,24 @@ } install_help() { - einfo "" - einfo "To create a new Zope Instance use the following command:" - einfo "$ /usr/lib/${PV}/bin/mkzopeinstance.py" - einfo "" - einfo "A good instance location might be /var/zope or /var/lib/zope" - einfo "" - einfo "Once your instance is setup you can start it with the following:" - einfo "$ /var[/lib]/zope/bin/zopectl start" - einfo "" + #einfo "" + #einfo "To create a new Zope Instance use the following command:" + ##einfo "$ /usr/lib/${PV}/bin/mkzopeinstance.py" + ##[cs] changed from bug post + #einfo "$ /usr/lib/${PF}/bin/mkzopeinstance.py" + #einfo " or better yet" + ##[cs] suggestion from bug report + #einfo "$ su zope -c /usr/lib/${PF}/bin/mkzopeinstance.py" + + #einfo "" + #einfo "A good instance location might be /var/zope or /var/lib/zope" + #einfo "" + #einfo "Once your instance is setup you can start it with the following:" + #einfo "$ /var[/lib]/zope/bin/zopectl start" + #einfo "" + + einfo "" + einfo "You need to create a zope instance. Run:" + einfo "\tzope-config" + einfo "" }