aboutsummaryrefslogtreecommitdiff
path: root/www/zope28/Makefile
diff options
context:
space:
mode:
authorHye-Shik Chang <perky@FreeBSD.org>2004-04-20 14:18:32 +0000
committerHye-Shik Chang <perky@FreeBSD.org>2004-04-20 14:18:32 +0000
commit5ea744a20f62502c7f3f2e5156894bd65d78dfd5 (patch)
tree4fb3bc61bac9e6fba15f7589c2795b4ab24af8b2 /www/zope28/Makefile
parent49594194326422c4c169cebe61632b450e6fce2d (diff)
downloadports-5ea744a20f62502c7f3f2e5156894bd65d78dfd5.tar.gz
ports-5ea744a20f62502c7f3f2e5156894bd65d78dfd5.zip
- Improve instance treatments and its startup scripts.
- Change global products directory location. PR: 65760 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=107721
Diffstat (limited to 'www/zope28/Makefile')
-rw-r--r--www/zope28/Makefile45
1 files changed, 28 insertions, 17 deletions
diff --git a/www/zope28/Makefile b/www/zope28/Makefile
index 1b6f5d23f8fa..17fdff1d597f 100644
--- a/www/zope28/Makefile
+++ b/www/zope28/Makefile
@@ -7,6 +7,7 @@
PORTNAME= zope
PORTVERSION= 2.7.0
+PORTREVISION= 1
CATEGORIES= www python zope
MASTER_SITES= http://www.zope.org/Products/Zope/${PORTVERSION}/${PORTVERSION}/
DISTNAME= Zope-${PORTVERSION}
@@ -18,25 +19,27 @@ COMMENT= An object-based web application platform
BUILD_DEPENDS+= ${LOCALBASE}/lib/${PYTHON_VERSION}/site-packages/_xmlplus/sax/expatreader.py:${PORTSDIR}/textproc/py-xml
USE_PYTHON= yes
+USE_RC_SUBR= yes
DIST_SUBDIR= zope
# 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.
-# Build has to be done in the final location after installing the sources
-# there. It was a major action to fix all paths otherwise.
-
# Change these, if you like, via the environment.
+ZOPE_USER?= www
WEBBASEDIR?= www
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope
-SCGIBINDIR?= ${WEBBASEDIR}/cgi-bin
-SAPACHE_CONFDIR?= etc/apache
-ZOPE_USER?= www
# Do not change anything below this line.
-ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
+.if defined(INSTANCENAME)
+ZOPEINSTANCENAME= ${INSTANCENAME}
+.endif
+
+ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
+ZOPEINSTANCEBASE?= ${PREFIX}/${SZOPEBASEDIR}
+ZOPEINSTANCEDIR?= ${ZOPEINSTANCEBASE}/${ZOPEINSTANCENAME}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${ZOPEBASEDIR}
@@ -46,6 +49,11 @@ ALL_TARGET= build
MAKEFILE= makefile
PLIST_SUB= ZOPEBASEDIR=${SZOPEBASEDIR}
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
+ RC_SUBR=${RC_SUBR}
+CONFIG_SUB= ZOPEBASEDIR=${ZOPEBASEDIR} \
+ ZOPE_USER=${ZOPE_USER} \
+ ZOPEINSTANCEDIR=${ZOPEINSTANCEDIR}
.if defined(BATCH)
ISBATCH= -u admin:test123
@@ -54,17 +62,20 @@ ISBATCH= ""
.endif
post-install:
- @${MV} ${PREFIX}/${SZOPEBASEDIR}/skel/etc/zope.conf.in ${PREFIX}/${SZOPEBASEDIR}/skel/etc/zope.conf.sample.in
- @${SED} -e "s|%%ZOPEBASEDIR%%|${ZOPEBASEDIR}|g" < pkg-message
+ @${MV} ${ZOPEBASEDIR}/skel/etc/zope.conf.in ${ZOPEBASEDIR}/skel/etc/zope.conf.sample.in
+ @${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} pkg-message
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/zope.sh > ${PREFIX}/etc/rc.d/zope.sh
+ @${CHMOD} ${BINMODE} ${PREFIX}/etc/rc.d/zope.sh
+ @${MKDIR} ${ZOPEBASEDIR}/Products
instance:
- @${PREFIX}/${SZOPEBASEDIR}/bin/mkzopeinstance.py -d ${ZOPEBASEDIR} ${ISBATCH}
- @${CAT} ${FILESDIR}/zope.conf_changes | \
- ${SED} "s/@@@ZOPE_USER@@@/${ZOPE_USER}/g" | \
- ${PATCH} ${ZOPEBASEDIR}/etc/zope.conf.sample
- @${RM} ${ZOPEBASEDIR}/etc/zope.conf.sample.orig
- @${CHOWN} ${ZOPE_USER} ${ZOPEBASEDIR}/var
- @${CHOWN} ${ZOPE_USER} ${ZOPEBASEDIR}/log
- @${SED} -e "s|%%ZOPEBASEDIR%%|${ZOPEBASEDIR}|g" < ${FILESDIR}/zope.sh.in > ${PREFIX}/etc/rc.d/zope.sh.sample
+ @${ZOPEBASEDIR}/bin/mkzopeinstance.py -d ${ZOPEINSTANCEDIR} ${ISBATCH}
+ @${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/zope.conf_changes | \
+ ${PATCH} ${ZOPEINSTANCEDIR}/etc/zope.conf.sample
+ @${RM} ${ZOPEINSTANCEDIR}/etc/zope.conf.sample.orig
+ @${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/var
+ @${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/log
+ @${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/instance_message
.include <bsd.port.mk>