1999-11-01 02:40:07 +00:00
|
|
|
# New ports collection makefile for: Zope
|
|
|
|
# Date created: Sat 21 Aug 1999
|
|
|
|
# Whom: Peter Cornelius <pcc@gmx.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
2000-04-10 00:07:29 +00:00
|
|
|
#
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2000-04-10 00:07:29 +00:00
|
|
|
PORTNAME= zope
|
2000-09-06 22:12:35 +00:00
|
|
|
PORTVERSION= 2.2.1
|
1999-11-01 02:40:07 +00:00
|
|
|
CATEGORIES= www python
|
2000-05-29 02:49:55 +00:00
|
|
|
MASTER_SITES= http://www.zope.org/Products/Zope/${PORTVERSION}/
|
2000-04-10 00:07:29 +00:00
|
|
|
DISTNAME= Zope-${PORTVERSION}-src
|
1999-11-01 02:40:07 +00:00
|
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
|
2000-08-08 20:01:47 +00:00
|
|
|
MAINTAINER= nbm@FreeBSD.org
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2000-09-15 14:19:36 +00:00
|
|
|
BUILD_DEPENDS= python1.5:${PORTSDIR}/lang/python15
|
2000-09-06 22:12:35 +00:00
|
|
|
|
2000-08-15 14:09:41 +00:00
|
|
|
#RUN_DEPENDS= ${LOCALBASE}/sbin/apache:${PORTSDIR}/www/apache13-modssl
|
1999-11-01 02:40:07 +00:00
|
|
|
|
|
|
|
# Build has to be done in the final location after installing the sources
|
|
|
|
# there. It were a major action to fix all paths otherwise.
|
|
|
|
do-build: # empty, but needs to be there for the python dependency.
|
|
|
|
|
|
|
|
# The web server's "root" directory used to be ${PREFIX}/www, and from
|
|
|
|
# then on, data, cgi-bin and such. Thus, I decided that Zope belongs
|
|
|
|
# there, too. I don't know whether this still applies to current apache
|
|
|
|
# releases, though. I still run 2.2.8-STABLE.
|
2000-09-06 22:12:35 +00:00
|
|
|
|
2000-09-07 11:04:44 +00:00
|
|
|
# Change these, if you like, via the environment.
|
|
|
|
WEBBASEDIR?= www
|
|
|
|
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope
|
|
|
|
SCGIBINDIR?= ${WEBBASEDIR}/cgi-bin.default
|
1999-11-01 02:40:07 +00:00
|
|
|
APACHE_CONFDIR?= ${PREFIX}/etc/apache
|
2000-08-15 14:09:41 +00:00
|
|
|
PYTHON15?= ${LOCALBASE}/bin/python1.5
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2000-09-07 11:04:44 +00:00
|
|
|
# Don't change these.
|
|
|
|
ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
|
|
|
|
CGIBINDIR= ${PREFIX}/${SCGIBINDIR}
|
|
|
|
|
|
|
|
PLIST_SUB= ZOPEBASEDIR=${SZOPEBASEDIR} \
|
|
|
|
CGIBINDIR=${SCGIBINDIR} \
|
2000-09-06 22:12:35 +00:00
|
|
|
VERSION=${PORTVERSION}
|
|
|
|
|
1999-11-01 02:40:07 +00:00
|
|
|
# I decided to consider the whole souce tree to be part of the package
|
|
|
|
# since in there, Zope can live on its own. It does leave some *.o files
|
|
|
|
# around (about four), but I can use Zope's own building mechanism.
|
|
|
|
do-install: #
|
2000-09-06 22:12:35 +00:00
|
|
|
@if [ -e ${ZOPEBASEDIR}/var/Data.fs ] ; then \
|
|
|
|
${ECHO} "Saving existing Database to /tmp/Data.fs.BAK." ; \
|
|
|
|
${MV} ${ZOPEBASEDIR}/var/Data.fs /tmp/Data.fs.BAK ; \
|
|
|
|
fi
|
2000-09-07 11:04:44 +00:00
|
|
|
#
|
2000-09-06 22:12:35 +00:00
|
|
|
@${MKDIR} ${ZOPEBASEDIR}
|
|
|
|
@${ECHO} "===> Please be patient, some builds need their time."
|
|
|
|
@${ECHO} "===> Copying..."
|
|
|
|
@${CP} -Rp ${WRKSRC}/* ${ZOPEBASEDIR}/
|
2000-09-07 11:04:44 +00:00
|
|
|
#
|
2000-09-06 22:12:35 +00:00
|
|
|
@(cd ${ZOPEBASEDIR} ; \
|
1999-11-01 02:40:07 +00:00
|
|
|
${PYTHON15} w_pcgi.py ; \
|
|
|
|
${PYTHON15} wo_pcgi.py ; \
|
|
|
|
${MV} Zope.cgi Zope.cgi.orig ; \
|
2000-09-06 22:12:35 +00:00
|
|
|
${ECHO} "#! ${CGIBINDIR}/pcgi-wrapper" > Zope.cgi ; \
|
|
|
|
${CAT} Zope.cgi.orig >> Zope.cgi )
|
2000-09-07 11:04:44 +00:00
|
|
|
#
|
2000-09-06 22:12:35 +00:00
|
|
|
@${MKDIR} ${CGIBINDIR}
|
|
|
|
@(cd ${ZOPEBASEDIR} ; \
|
|
|
|
${INSTALL} -o nobody -m 555 Zope.cgi \
|
|
|
|
pcgi/pcgi-wrapper \
|
|
|
|
${CGIBINDIR} )
|
2000-09-07 11:04:44 +00:00
|
|
|
#
|
2000-09-06 22:12:35 +00:00
|
|
|
@${ECHO} "===> Fixing permissions of Zope's own var directory..."
|
2000-09-07 11:04:44 +00:00
|
|
|
@${CHMOD} ugo+rwt ${ZOPEBASEDIR}/var
|
|
|
|
@${CHOWN} nobody ${ZOPEBASEDIR}/var
|
|
|
|
@${CHOWN} nobody ${ZOPEBASEDIR}/var/*
|
2000-09-06 22:12:35 +00:00
|
|
|
#
|
|
|
|
@${ECHO} "===> Setting user/password to zopemaster/test..."
|
|
|
|
@(cd ${ZOPEBASEDIR} && \
|
|
|
|
${PYTHON15} zpasswd.py -u zopemaster \
|
|
|
|
-p test -e CLEARTEXT access )
|
|
|
|
#
|
|
|
|
@${CHOWN} nobody ${ZOPEBASEDIR}/access
|
|
|
|
#
|
|
|
|
@${ECHO} "===> Copying Apache config file changes to ${APACHE_CONFDIR}/apache.conf.Zope-Changes."
|
|
|
|
@${MKDIR} ${APACHE_CONFDIR}
|
|
|
|
@${CP} -p ${FILESDIR}/apache.conf.Zope-Changes ${APACHE_CONFDIR}/
|
|
|
|
#
|
|
|
|
@${ECHO} "===> Please have a look at this file and the instructions"
|
|
|
|
@${ECHO} "===> therein and incorporate them to your apache.conf."
|
|
|
|
@${ECHO} "===> Creating rc startup file for Zope-${PORTVERSION}..."
|
|
|
|
@${SED} -e "s|%%ZOPEBASEDIR%%|${ZOPEBASEDIR}|g" -e "s|%%CGIBINDIR%%|${CGIBINDIR}|g" \
|
|
|
|
< ${FILESDIR}/zope.sh.in > ${PREFIX}/etc/rc.d/zope.sh
|
|
|
|
@${CHMOD} ug+x,o-rwx ${PREFIX}/etc/rc.d/zope.sh
|
|
|
|
@${ECHO} "===> Done with ${PREFIX}/etc/rc.d/zope.sh."
|
|
|
|
@${CAT} ${FILESDIR}/Message
|
|
|
|
@${ECHO} "===> Your Zope base directory is ${ZOPEBASEDIR}."
|
|
|
|
@${ECHO} "===> The Zope license is in ${ZOPEBASEDIR}/LICENSE.txt."
|
|
|
|
@${ECHO} "===> For Apache changes see ${APACHE_CONFDIR}/apache.conf.Zope-Changes."
|
|
|
|
@${ECHO} "===> Zope.cgi and pcgi-wrapper live in ${CGIBINDIR}."
|
1999-11-01 02:40:07 +00:00
|
|
|
|
|
|
|
#pre-deinstall: # Save Database contents. I expect /tmp to have sufficient
|
|
|
|
# # space to hold it for the time being.
|
|
|
|
# @if [ -e ${ZOPEBASEDIR}/var/Data.fs ] ; then \
|
|
|
|
# ${ECHO} "Saving existing Database to /tmp/Data.fs.bak." ; \
|
|
|
|
# ${MV} ${ZOPEBASEDIR}/var/Data.fs /tmp/Data.fs.bak ; \
|
|
|
|
# fi
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|