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
|
2003-05-12 03:36:53 +00:00
|
|
|
PORTVERSION= 2.6.1
|
2003-06-16 08:59:10 +00:00
|
|
|
PORTREVISION= 1
|
2001-08-04 17:29:00 +00:00
|
|
|
CATEGORIES= www python zope
|
2002-05-08 18:50:07 +00:00
|
|
|
MASTER_SITES= http://www.zope.org/Products/Zope/${PORTVERSION}/
|
2000-04-10 00:07:29 +00:00
|
|
|
DISTNAME= Zope-${PORTVERSION}-src
|
2002-05-08 18:50:07 +00:00
|
|
|
EXTRACT_SUFX= .tgz
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2003-08-27 18:24:56 +00:00
|
|
|
MAINTAINER= nbm@FreeBSD.org
|
2003-05-12 03:36:53 +00:00
|
|
|
COMMENT= An object-based web application platform
|
2003-05-07 00:12:29 +00:00
|
|
|
|
2001-03-06 22:30:21 +00:00
|
|
|
USE_PYTHON= yes
|
2003-07-09 05:01:51 +00:00
|
|
|
PYTHON_VERSION?=python2.1
|
2000-09-06 22:12:35 +00:00
|
|
|
|
2000-10-14 23:33:12 +00:00
|
|
|
DIST_SUBDIR= zope
|
|
|
|
|
2002-11-03 13:17:17 +00:00
|
|
|
# Note: the notes that follow reflect the decisions of prior maintainers
|
|
|
|
# of this port. IOW, don't blame me if you don't like the way it's done.
|
|
|
|
# Exceptions to this are marked as such.
|
|
|
|
|
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
|
2002-07-27 06:29:13 +00:00
|
|
|
SCGIBINDIR?= ${WEBBASEDIR}/cgi-bin
|
2001-03-06 22:30:21 +00:00
|
|
|
SAPACHE_CONFDIR?= etc/apache
|
2002-02-05 20:26:09 +00:00
|
|
|
ZOPE_HTTP_PORT?= 8080
|
|
|
|
ZOPE_FTP_PORT?= 8021
|
|
|
|
ZOPE_MONITOR_PORT?= ''
|
1999-11-01 02:40:07 +00:00
|
|
|
|
2002-02-05 20:26:09 +00:00
|
|
|
ZOPE_USER= www
|
2000-09-19 14:25:24 +00:00
|
|
|
|
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
|
|
|
|
2002-07-27 06:29:13 +00:00
|
|
|
# Force the cgi-bin dir or link to exist.
|
2002-11-03 13:17:17 +00:00
|
|
|
# If we have to create it, call it -dist to emphasize that the port
|
|
|
|
# set it up. <alane>
|
|
|
|
|
2002-02-05 20:26:09 +00:00
|
|
|
pre-install:
|
|
|
|
PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
|
|
|
|
|
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:
|
2003-01-12 17:48:19 +00:00
|
|
|
@if test ! -d ${CGIBINDIR}; then \
|
|
|
|
${ECHO_CMD} "The directory for Zope's CGI scripts does"\
|
|
|
|
"not exist, so I will create it.";\
|
|
|
|
${ECHO_CMD} "They will be placed in ${CGIBINDIR}.";\
|
|
|
|
${ECHO_CMD} ;\
|
|
|
|
${MKDIR} ${CGIBINDIR}; ${CHMOD} 0755 ${CGIBINDIR}; fi
|
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}/
|
2002-05-08 18:50:07 +00:00
|
|
|
#
|
|
|
|
# Copying some patches
|
|
|
|
#
|
2001-09-10 08:52:19 +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 ; \
|
2002-01-29 12:08:37 +00:00
|
|
|
${ECHO_CMD} "#! ${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
|
|
|
@#
|
2001-10-19 21:09:35 +00:00
|
|
|
@(cd ${ZOPEBASEDIR} && \
|
|
|
|
${MV} Zope.cgi \
|
2000-09-06 22:12:35 +00:00
|
|
|
pcgi/pcgi-wrapper \
|
|
|
|
${CGIBINDIR} )
|
2001-10-19 21:09:35 +00:00
|
|
|
@(cd ${CGIBINDIR} && \
|
|
|
|
${CHMOD} 555 Zope.cgi pcgi-wrapper )
|
2003-05-12 03:36:53 +00:00
|
|
|
@${RM} -rf ${ZOPEBASEDIR}/lib/python/build/
|
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
|
2003-05-12 03:36:53 +00:00
|
|
|
@${CHOWN} root ${ZOPEBASEDIR}/var
|
2002-02-05 20:26:09 +00:00
|
|
|
@${CHOWN} ${ZOPE_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
|
|
|
@#
|
2002-02-05 20:26:09 +00:00
|
|
|
@${CHOWN} ${ZOPE_USER} ${ZOPEBASEDIR}/access
|
2000-09-19 14:25:24 +00:00
|
|
|
@#
|
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
|
2002-02-05 20:26:09 +00:00
|
|
|
@${SED} -e "s|%%ZOPEBASEDIR%%|${ZOPEBASEDIR}|g" \
|
|
|
|
-e "s|%%CGIBINDIR%%|${CGIBINDIR}|g" \
|
|
|
|
-e "s|%%ZOPE_USER%%|${ZOPE_USER}|g" \
|
|
|
|
-e "s|%%ZOPE_HTTP_PORT%%|${ZOPE_HTTP_PORT}|g" \
|
|
|
|
-e "s|%%ZOPE_FTP_PORT%%|${ZOPE_FTP_PORT}|g" \
|
|
|
|
-e "s|%%ZOPE_MONITOR_PORT%%|${ZOPE_MONITOR_PORT}|g" \
|
2003-08-28 18:55:15 +00:00
|
|
|
< ${FILESDIR}/zope.sh.in > ${PREFIX}/etc/rc.d/zope.sh.sample
|
|
|
|
@${CHMOD} ug+x,o-rwx ${PREFIX}/etc/rc.d/zope.sh.sample
|
|
|
|
@${ECHO} "===> Done with ${PREFIX}/etc/rc.d/zope.sh.sample."
|
2000-09-06 22:12:35 +00:00
|
|
|
@${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>
|