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
|
2001-05-03 10:14:53 +00:00
|
|
|
PORTVERSION= 2.3.2
|
2001-03-31 12:12:26 +00:00
|
|
|
PORTREVISION= 0
|
1999-11-01 02:40:07 +00:00
|
|
|
CATEGORIES= www python
|
2001-05-03 10:14:53 +00:00
|
|
|
MASTER_SITES= http://www.zope.org/Products/Zope/${PORTVERSION}/ \
|
|
|
|
http://www.zope.org/Products/Zope/Hotfix_2001-05-01/
|
2000-04-10 00:07:29 +00:00
|
|
|
DISTNAME= Zope-${PORTVERSION}-src
|
1999-11-01 02:40:07 +00:00
|
|
|
EXTRACT_SUFX= .tgz
|
2001-05-03 10:14:53 +00:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
|
|
|
Hotfix_2001-05-01.tgz
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2000-08-08 20:01:47 +00:00
|
|
|
MAINTAINER= nbm@FreeBSD.org
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2001-03-06 22:30:21 +00:00
|
|
|
USE_PYTHON= yes
|
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
|
|
|
|
2000-10-14 23:33:12 +00:00
|
|
|
DIST_SUBDIR= zope
|
|
|
|
|
1999-11-01 02:40:07 +00:00
|
|
|
# Build has to be done in the final location after installing the sources
|
2001-03-06 22:30:21 +00:00
|
|
|
# there. It was a major action to fix all paths otherwise.
|
1999-11-01 02:40:07 +00:00
|
|
|
do-build: # empty, but needs to be there for the python dependency.
|
|
|
|
|
2000-09-07 11:04:44 +00:00
|
|
|
# Change these, if you like, via the environment.
|
2001-03-06 22:30:21 +00:00
|
|
|
WEBBASEDIR?= www
|
|
|
|
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope
|
|
|
|
SCGIBINDIR?= ${WEBBASEDIR}/cgi-bin.default
|
|
|
|
SAPACHE_CONFDIR?= etc/apache
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2000-09-19 14:25:24 +00:00
|
|
|
WHOAMI!= id -un
|
|
|
|
.if ${WHOAMI} == "root"
|
|
|
|
NOBODY_USER?= nobody
|
|
|
|
.else
|
|
|
|
NOBODY_USER?= ${WHOAMI}
|
|
|
|
.endif
|
|
|
|
|
2000-09-07 11:04:44 +00:00
|
|
|
# Don't change these.
|
|
|
|
ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
|
|
|
|
CGIBINDIR= ${PREFIX}/${SCGIBINDIR}
|
2001-03-06 22:30:21 +00:00
|
|
|
APACHE_CONFDIR= ${PREFIX}/${SAPACHE_CONFDIR}
|
2000-09-07 11:04:44 +00:00
|
|
|
|
|
|
|
PLIST_SUB= ZOPEBASEDIR=${SZOPEBASEDIR} \
|
|
|
|
CGIBINDIR=${SCGIBINDIR} \
|
2001-03-06 22:30:21 +00:00
|
|
|
APACHE_CONFDIR=${SAPACHE_CONFDIR} \
|
|
|
|
VERSION=${PORTVERSION} \
|
|
|
|
WEBBASEDIR=${WEBBASEDIR}
|
2000-09-06 22:12:35 +00:00
|
|
|
|
1999-11-01 02:40:07 +00:00
|
|
|
# I decided to consider the whole souce tree to be part of the package
|
2001-03-08 11:55:18 +00:00
|
|
|
# since in there, Zope can live on its own. 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 \
|
2001-03-08 11:55:18 +00:00
|
|
|
${ECHO} "Saving existing Database to ${ZOPEBASEDIR}/var/Data.fs.preserve." ; \
|
|
|
|
${MV} ${ZOPEBASEDIR}/var/Data.fs ${ZOPEBASEDIR}/var/Data.fs.preserve; \
|
|
|
|
fi
|
2000-09-19 14:25:24 +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}/
|
2001-05-03 10:23:54 +00:00
|
|
|
@${CP} -Rp ${WRKDIR}/lib ${ZOPEBASEDIR}/
|
2000-09-19 14:25:24 +00:00
|
|
|
@#
|
|
|
|
@${CHMOD} -R u+w ${ZOPEBASEDIR}
|
2001-03-06 22:30:21 +00:00
|
|
|
@(cd ${ZOPEBASEDIR} && ${PYTHON_CMD} w_pcgi.py)
|
2000-09-19 14:25:24 +00:00
|
|
|
@${CHMOD} -R u+w ${ZOPEBASEDIR}
|
2001-03-06 22:30:21 +00:00
|
|
|
@(cd ${ZOPEBASEDIR} && ${PYTHON_CMD} wo_pcgi.py)
|
2000-09-19 14:25:24 +00:00
|
|
|
@(cd ${ZOPEBASEDIR} && \
|
1999-11-01 02:40:07 +00:00
|
|
|
${MV} Zope.cgi Zope.cgi.orig ; \
|
2000-09-06 22:12:35 +00:00
|
|
|
${ECHO} "#! ${CGIBINDIR}/pcgi-wrapper" > Zope.cgi ; \
|
2001-03-06 22:30:21 +00:00
|
|
|
${CAT} Zope.cgi.orig >> Zope.cgi ; \
|
|
|
|
${RM} Zope.cgi.orig )
|
2001-03-08 11:55:18 +00:00
|
|
|
@(cd ${ZOPEBASEDIR}/pcgi/Test && ${RM} *.o)
|
|
|
|
@(cd ${ZOPEBASEDIR}/pcgi && ${RM} *.o)
|
2000-09-19 14:25:24 +00:00
|
|
|
@#
|
2000-09-06 22:12:35 +00:00
|
|
|
@${MKDIR} ${CGIBINDIR}
|
|
|
|
@(cd ${ZOPEBASEDIR} ; \
|
2000-09-19 14:25:24 +00:00
|
|
|
${INSTALL} -m 555 Zope.cgi \
|
2000-09-06 22:12:35 +00:00
|
|
|
pcgi/pcgi-wrapper \
|
|
|
|
${CGIBINDIR} )
|
2000-09-19 14:25:24 +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
|
2000-09-19 14:25:24 +00:00
|
|
|
@${CHOWN} ${NOBODY_USER} ${ZOPEBASEDIR}/var
|
|
|
|
@${CHOWN} ${NOBODY_USER} ${ZOPEBASEDIR}/var/*
|
2001-03-06 22:30:21 +00:00
|
|
|
@${RM} ${ZOPEBASEDIR}/var/.cvsignore
|
2001-03-08 11:55:18 +00:00
|
|
|
@if [ -e ${ZOPEBASEDIR}/var/Data.fs.preserve ] ; then \
|
|
|
|
${ECHO} "Restoring existing Database from ${ZOPEBASEDIR}/var/Data.fs.preserve." ; \
|
|
|
|
${MV} ${ZOPEBASEDIR}/var/Data.fs.preserve ${ZOPEBASEDIR}/var/Data.fs; \
|
|
|
|
fi
|
2000-09-19 14:25:24 +00:00
|
|
|
@#
|
2001-03-08 11:55:18 +00:00
|
|
|
@if [ ! -f ${ZOPEBASEDIR}/access ]; then \
|
|
|
|
${ECHO} "===> Setting user/password to zopemaster/test..."; \
|
|
|
|
(cd ${ZOPEBASEDIR} && \
|
|
|
|
${PYTHON_CMD} zpasswd.py -u zopemaster \
|
|
|
|
-p test -e CLEARTEXT access ); \
|
|
|
|
fi
|
2000-09-19 14:25:24 +00:00
|
|
|
@#
|
|
|
|
@${CHOWN} ${NOBODY_USER} ${ZOPEBASEDIR}/access
|
|
|
|
@#
|
2000-09-06 22:12:35 +00:00
|
|
|
@${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}/
|
2000-09-19 14:25:24 +00:00
|
|
|
@#
|
2000-09-06 22:12:35 +00:00
|
|
|
@${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}..."
|
2000-10-14 23:33:12 +00:00
|
|
|
@${MKDIR} ${PREFIX}/etc/rc.d
|
2000-09-06 22:12:35 +00:00
|
|
|
@${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
|
|
|
|
|
|
|
.include <bsd.port.mk>
|