1999-10-31 21:40:07 -05:00
|
|
|
# New ports collection makefile for: Zope
|
|
|
|
# Date created: Sat 21 Aug 1999
|
|
|
|
# Whom: Peter Cornelius <pcc@gmx.net>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
2000-04-09 20:07:29 -04:00
|
|
|
#
|
1999-10-31 21:40:07 -05:00
|
|
|
|
2000-04-09 20:07:29 -04:00
|
|
|
PORTNAME= zope
|
2002-05-08 14:50:07 -04:00
|
|
|
PORTVERSION= 2.5.1
|
2002-07-27 02:29:13 -04:00
|
|
|
PORTREVISION= 2
|
2001-08-04 13:29:00 -04:00
|
|
|
CATEGORIES= www python zope
|
2002-05-08 14:50:07 -04:00
|
|
|
MASTER_SITES= http://www.zope.org/Products/Zope/${PORTVERSION}/
|
2000-04-09 20:07:29 -04:00
|
|
|
DISTNAME= Zope-${PORTVERSION}-src
|
2002-05-08 14:50:07 -04:00
|
|
|
EXTRACT_SUFX= .tgz
|
1999-10-31 21:40:07 -05:00
|
|
|
|
2002-11-01 08:09:32 -05:00
|
|
|
MAINTAINER= alane@FreeBSD.org
|
1999-10-31 21:40:07 -05:00
|
|
|
|
2001-03-06 17:30:21 -05:00
|
|
|
USE_PYTHON= yes
|
2002-02-05 15:26:09 -05:00
|
|
|
PYTHON_VERSION= python2.1
|
2000-09-06 18:12:35 -04:00
|
|
|
|
2000-10-14 19:33:12 -04:00
|
|
|
DIST_SUBDIR= zope
|
|
|
|
|
2002-11-03 08:17:17 -05: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-10-31 21:40:07 -05:00
|
|
|
# Build has to be done in the final location after installing the sources
|
2001-03-06 17:30:21 -05:00
|
|
|
# there. It was a major action to fix all paths otherwise.
|
1999-10-31 21:40:07 -05:00
|
|
|
do-build: # empty, but needs to be there for the python dependency.
|
|
|
|
|
2000-09-07 07:04:44 -04:00
|
|
|
# Change these, if you like, via the environment.
|
2001-03-06 17:30:21 -05:00
|
|
|
WEBBASEDIR?= www
|
|
|
|
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope
|
2002-07-27 02:29:13 -04:00
|
|
|
SCGIBINDIR?= ${WEBBASEDIR}/cgi-bin
|
2001-03-06 17:30:21 -05:00
|
|
|
SAPACHE_CONFDIR?= etc/apache
|
2002-02-05 15:26:09 -05:00
|
|
|
ZOPE_HTTP_PORT?= 8080
|
|
|
|
ZOPE_FTP_PORT?= 8021
|
|
|
|
ZOPE_MONITOR_PORT?= ''
|
1999-10-31 21:40:07 -05:00
|
|
|
|
2002-02-05 15:26:09 -05:00
|
|
|
ZOPE_USER= www
|
2000-09-19 10:25:24 -04:00
|
|
|
|
2000-09-07 07:04:44 -04:00
|
|
|
# Don't change these.
|
|
|
|
ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
|
|
|
|
CGIBINDIR= ${PREFIX}/${SCGIBINDIR}
|
2001-03-06 17:30:21 -05:00
|
|
|
APACHE_CONFDIR= ${PREFIX}/${SAPACHE_CONFDIR}
|
2000-09-07 07:04:44 -04:00
|
|
|
|
|
|
|
PLIST_SUB= ZOPEBASEDIR=${SZOPEBASEDIR} \
|
|
|
|
CGIBINDIR=${SCGIBINDIR} \
|
2001-03-06 17:30:21 -05:00
|
|
|
APACHE_CONFDIR=${SAPACHE_CONFDIR} \
|
|
|
|
VERSION=${PORTVERSION} \
|
|
|
|
WEBBASEDIR=${WEBBASEDIR}
|
2000-09-06 18:12:35 -04:00
|
|
|
|
2002-07-27 02:29:13 -04:00
|
|
|
# Force the cgi-bin dir or link to exist.
|
2002-11-03 08:17:17 -05:00
|
|
|
# If we have to create it, call it -dist to emphasize that the port
|
|
|
|
# set it up. <alane>
|
|
|
|
|
|
|
|
pre-everything:
|
2002-07-27 02:29:13 -04:00
|
|
|
@if test ! -d ${CGIBINDIR}; then \
|
2002-11-03 08:17:17 -05:00
|
|
|
${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
|
2002-07-27 02:29:13 -04:00
|
|
|
|
2002-02-05 15:26:09 -05:00
|
|
|
pre-install:
|
|
|
|
PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
|
|
|
|
|
1999-10-31 21:40:07 -05:00
|
|
|
# I decided to consider the whole souce tree to be part of the package
|
2001-03-08 06:55:18 -05:00
|
|
|
# since in there, Zope can live on its own. I can use Zope's own building
|
|
|
|
# mechanism.
|
|
|
|
do-install:
|
2000-09-06 18:12:35 -04:00
|
|
|
@if [ -e ${ZOPEBASEDIR}/var/Data.fs ] ; then \
|
2001-03-08 06:55:18 -05: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 10:25:24 -04:00
|
|
|
@#
|
2000-09-06 18:12:35 -04:00
|
|
|
@${MKDIR} ${ZOPEBASEDIR}
|
|
|
|
@${ECHO} "===> Please be patient, some builds need their time."
|
|
|
|
@${ECHO} "===> Copying..."
|
|
|
|
@${CP} -Rp ${WRKSRC}/* ${ZOPEBASEDIR}/
|
2002-05-08 14:50:07 -04:00
|
|
|
#
|
|
|
|
# Copying some patches
|
|
|
|
#
|
2001-09-10 04:52:19 -04:00
|
|
|
#@${CP} -Rp ${WRKDIR}/lib ${ZOPEBASEDIR}/
|
2000-09-19 10:25:24 -04:00
|
|
|
@#
|
|
|
|
@${CHMOD} -R u+w ${ZOPEBASEDIR}
|
2001-03-06 17:30:21 -05:00
|
|
|
@(cd ${ZOPEBASEDIR} && ${PYTHON_CMD} w_pcgi.py)
|
2000-09-19 10:25:24 -04:00
|
|
|
@${CHMOD} -R u+w ${ZOPEBASEDIR}
|
2001-03-06 17:30:21 -05:00
|
|
|
@(cd ${ZOPEBASEDIR} && ${PYTHON_CMD} wo_pcgi.py)
|
2000-09-19 10:25:24 -04:00
|
|
|
@(cd ${ZOPEBASEDIR} && \
|
1999-10-31 21:40:07 -05:00
|
|
|
${MV} Zope.cgi Zope.cgi.orig ; \
|
2002-01-29 07:08:37 -05:00
|
|
|
${ECHO_CMD} "#! ${CGIBINDIR}/pcgi-wrapper" > Zope.cgi ; \
|
2001-03-06 17:30:21 -05:00
|
|
|
${CAT} Zope.cgi.orig >> Zope.cgi ; \
|
|
|
|
${RM} Zope.cgi.orig )
|
2001-03-08 06:55:18 -05:00
|
|
|
@(cd ${ZOPEBASEDIR}/pcgi/Test && ${RM} *.o)
|
|
|
|
@(cd ${ZOPEBASEDIR}/pcgi && ${RM} *.o)
|
2000-09-19 10:25:24 -04:00
|
|
|
@#
|
2001-10-19 17:09:35 -04:00
|
|
|
@(cd ${ZOPEBASEDIR} && \
|
|
|
|
${MV} Zope.cgi \
|
2000-09-06 18:12:35 -04:00
|
|
|
pcgi/pcgi-wrapper \
|
|
|
|
${CGIBINDIR} )
|
2001-10-19 17:09:35 -04:00
|
|
|
@(cd ${CGIBINDIR} && \
|
|
|
|
${CHMOD} 555 Zope.cgi pcgi-wrapper )
|
2000-09-19 10:25:24 -04:00
|
|
|
@#
|
2000-09-06 18:12:35 -04:00
|
|
|
@${ECHO} "===> Fixing permissions of Zope's own var directory..."
|
2000-09-07 07:04:44 -04:00
|
|
|
@${CHMOD} ugo+rwt ${ZOPEBASEDIR}/var
|
2002-02-05 15:26:09 -05:00
|
|
|
@${CHOWN} ${ZOPE_USER} ${ZOPEBASEDIR}/var
|
|
|
|
@${CHOWN} ${ZOPE_USER} ${ZOPEBASEDIR}/var/*
|
2001-03-06 17:30:21 -05:00
|
|
|
@${RM} ${ZOPEBASEDIR}/var/.cvsignore
|
2001-03-08 06:55:18 -05: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 10:25:24 -04:00
|
|
|
@#
|
2001-03-08 06:55:18 -05: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 10:25:24 -04:00
|
|
|
@#
|
2002-02-05 15:26:09 -05:00
|
|
|
@${CHOWN} ${ZOPE_USER} ${ZOPEBASEDIR}/access
|
2000-09-19 10:25:24 -04:00
|
|
|
@#
|
2000-09-06 18:12:35 -04: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 10:25:24 -04:00
|
|
|
@#
|
2000-09-06 18:12:35 -04: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 19:33:12 -04:00
|
|
|
@${MKDIR} ${PREFIX}/etc/rc.d
|
2002-02-05 15:26:09 -05: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" \
|
2000-09-06 18:12:35 -04:00
|
|
|
< ${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-10-31 21:40:07 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|