diff options
author | Hye-Shik Chang <perky@FreeBSD.org> | 2004-04-20 14:18:32 +0000 |
---|---|---|
committer | Hye-Shik Chang <perky@FreeBSD.org> | 2004-04-20 14:18:32 +0000 |
commit | 5ea744a20f62502c7f3f2e5156894bd65d78dfd5 (patch) | |
tree | 4fb3bc61bac9e6fba15f7589c2795b4ab24af8b2 /www/zope29 | |
parent | 49594194326422c4c169cebe61632b450e6fce2d (diff) | |
download | ports-5ea744a20f62502c7f3f2e5156894bd65d78dfd5.tar.gz ports-5ea744a20f62502c7f3f2e5156894bd65d78dfd5.zip |
Notes
Diffstat (limited to 'www/zope29')
-rw-r--r-- | www/zope29/Makefile | 45 | ||||
-rw-r--r-- | www/zope29/files/instance_message | 14 | ||||
-rw-r--r-- | www/zope29/files/zope.conf_changes | 18 | ||||
-rw-r--r-- | www/zope29/files/zope.sh | 53 | ||||
-rw-r--r-- | www/zope29/files/zope.sh.in | 22 | ||||
-rw-r--r-- | www/zope29/pkg-message | 25 | ||||
-rw-r--r-- | www/zope29/pkg-plist | 3 |
7 files changed, 130 insertions, 50 deletions
diff --git a/www/zope29/Makefile b/www/zope29/Makefile index 1b6f5d23f8fa..17fdff1d597f 100644 --- a/www/zope29/Makefile +++ b/www/zope29/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> diff --git a/www/zope29/files/instance_message b/www/zope29/files/instance_message new file mode 100644 index 000000000000..2521235227d8 --- /dev/null +++ b/www/zope29/files/instance_message @@ -0,0 +1,14 @@ +********************************************************************** + +Zope instance successfully installed + +If Zope should get started automatically when the system starts, +please add the following lines to /etc/rc.conf + +zope_enable="YES" +zope_instances="%%ZOPEINSTANCEDIR%%" + +If there is already a zope_instances entry please add +%%ZOPEINSTANCEDIR%% separated by a space. + + diff --git a/www/zope29/files/zope.conf_changes b/www/zope29/files/zope.conf_changes index a7f67e1c18aa..ba227775266c 100644 --- a/www/zope29/files/zope.conf_changes +++ b/www/zope29/files/zope.conf_changes @@ -1,10 +1,20 @@ ---- zope.conf.sample.orig Mon Nov 3 11:04:10 2003 -+++ zope.conf.sample Mon Nov 3 11:04:50 2003 -@@ -137,6 +137,7 @@ +--- work/Zope-2.7.0/skel/etc/zope.conf.in Fri Jan 9 00:34:08 2004 ++++ /data/infosys/zope/etc/zope.conf Wed Apr 14 09:36:46 2004 +@@ -78,7 +78,8 @@ + # + # Example: + # +-# products /home/chrism/projects/myproducts ++products %%ZOPEBASEDIR%%/Products ++products $INSTANCE/Products + + + # Directive: environment +@@ -137,6 +138,7 @@ # Example: # # effective-user chrism -+effective-user @@@ZOPE_USER@@@ ++effective-user %%ZOPE_USER%% # Directive: enable-product-installation diff --git a/www/zope29/files/zope.sh b/www/zope29/files/zope.sh new file mode 100644 index 000000000000..478e65fe4f1a --- /dev/null +++ b/www/zope29/files/zope.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# Start or stop zope +# $FreeBSD: /tmp/pcvs/ports/www/zope29/files/Attic/zope.sh,v 1.1 2004-04-20 14:18:32 perky Exp $ + +# PROVIDE: zope +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown +# +prefix=%%PREFIX%% + +# Define these zope_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/gkrellmd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +zope_enable=${zope_enable:-"NO"} # Enable gkrellmd +zope_instances=${zope_instances:-""} # List of instancehome dirs + +. %%RC_SUBR%% + +name="zope" +rcvar=`set_rcvar` +load_rc_config $name + +if checkyesno zope_enable; then + + case "$1" in + start) + echo "Starting Zope" + ;; + stop) + echo "Stopping Zope" + ;; + restart) + echo "Restarting Zope" + ;; + *) + echo "Unknown aktion \"$1\"" + ;; + esac + + for instance in $zope_instances + do + if [ -r ${instance}/etc/${name}.conf -a -x ${instance}/bin/zopectl ]; then + echo -n " Instance ${instance} -> " + ${instance}/bin/zopectl $1 + fi + done +fi diff --git a/www/zope29/files/zope.sh.in b/www/zope29/files/zope.sh.in deleted file mode 100644 index 727778464e0e..000000000000 --- a/www/zope29/files/zope.sh.in +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -case "$1" in -start) - umask 077 - %%ZOPEBASEDIR%%/bin/zopectl --daemon start > /dev/null 2>&1 - echo -n " Zope" - ;; -stop) - %%ZOPEBASEDIR%%/bin/zopectl stop > /dev/null 2>&1 - echo -n " Zope" - ;; -restart) - %%ZOPEBASEDIR%%/bin/zopectl restart > /dev/null 2>&1 - echo -n " Zope" - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/www/zope29/pkg-message b/www/zope29/pkg-message index 0d0be67a8e4c..5712bfdfeae5 100644 --- a/www/zope29/pkg-message +++ b/www/zope29/pkg-message @@ -2,16 +2,27 @@ Zope 2.7 Successfull installed. -To create an instance of Zope please run - +To create an instance of Zope please run make instance -to create an instance in %%ZOPEBASEDIR%%. To create an instance in a -diffrent location run +You can set the following Variables in /etc/make.conf -make instance ZOPEBASEDIR=<instance_home> +ZOPEINSTANCEBASE Directory where Zope instance should go + (default: %%ZOPEBASEDIR%%) +ZOPEINSTANCENAME Default name for a new Zope instance + (default: none) -Files installed by make instance will NOT be deleted when Zope is -deinstalled. You have to delete them yourself +If you want have multiple Zope you should run +make instance INSTANCENAME=<somename> ********************************************************************** +****** ATTENTION ***** ATTENTION ***** ATTENTION ***** ATTENTION ***** + +The default installation directory for Zope Products has changed from +%%ZOPEBASEDIR%%/lib/python/Products +to %%ZOPEBASEDIR%%/Products. + +You migth have to add the following lines to your zope.conf +products %%ZOPEBASEDIR%%/Products +products $INSTANCE/Products + diff --git a/www/zope29/pkg-plist b/www/zope29/pkg-plist index eda07eb114ea..a36497f6074a 100644 --- a/www/zope29/pkg-plist +++ b/www/zope29/pkg-plist @@ -1,7 +1,9 @@ +etc/rc.d/zope.sh %%ZOPEBASEDIR%%/bin/README.txt %%ZOPEBASEDIR%%/bin/check_catalog.py %%ZOPEBASEDIR%%/bin/compilezpy.py %%ZOPEBASEDIR%%/bin/copyzopeskel.py +@exec rm -f %%ZOPEBASEDIR%%/bin/copyzopeskel.pyc %%ZOPEBASEDIR%%/bin/decompilezpy.py %%ZOPEBASEDIR%%/bin/load_site.py %%ZOPEBASEDIR%%/bin/mkzeoinstance.py @@ -3043,6 +3045,7 @@ @dirrm %%ZOPEBASEDIR%%/lib/python/AccessControl @dirrm %%ZOPEBASEDIR%%/lib/python @dirrm %%ZOPEBASEDIR%%/lib +@dirrm %%ZOPEBASEDIR%%/Products @dirrm %%ZOPEBASEDIR%%/import @dirrm %%ZOPEBASEDIR%%/doc/zconfig @dirrm %%ZOPEBASEDIR%%/doc/changenotes |