summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authortsarna <tsarna>1998-12-12 17:28:23 +0000
committertsarna <tsarna>1998-12-12 17:28:23 +0000
commit95e58d39e3076508132f95535113fda927023fa5 (patch)
treeae4e708080b187ee896c8f0620dbe3170ae980b9 /www
parent33b13b27dc3da57544b08f8587d8c99abe741d08 (diff)
downloadpkgsrc-95e58d39e3076508132f95535113fda927023fa5.tar.gz
Import of pkg for Zope, a web application platform
Diffstat (limited to 'www')
-rw-r--r--www/zope/Makefile39
-rw-r--r--www/zope/files/Makefile.in31
-rw-r--r--www/zope/files/md53
-rwxr-xr-xwww/zope/files/zope-install.py177
-rw-r--r--www/zope/pkg/COMMENT1
-rw-r--r--www/zope/pkg/DESCR19
-rw-r--r--www/zope/pkg/MESSAGE11
-rw-r--r--www/zope/pkg/PLIST.pre2
8 files changed, 283 insertions, 0 deletions
diff --git a/www/zope/Makefile b/www/zope/Makefile
new file mode 100644
index 00000000000..f0f065d4d3f
--- /dev/null
+++ b/www/zope/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile,v 1.1.1.1 1998/12/12 17:28:23 tsarna Exp $
+#
+
+DISTNAME= Zope-1.9.0b2-src
+PKGNAME= zope-1.9.0b2
+CATEGORIES= www
+MASTER_SITES= http://www.zope.org/Download/Releases/Zope-1.9.0b2/
+
+MAINTAINER= tsarna@netbsd.org
+HOMEPAGE= http://www.zope.org/
+
+DEPENDS+= python-1.5.1:../../lang/python
+
+CONFLICTS= zope-1.9b1
+
+PLIST_SRC= ${WRKDIR}/.PLIST_SRC
+
+ZOPEDIR= ${PREFIX}/zope
+
+do-configure:
+ ${SED} -e "s,@PREFIX@,${PREFIX}," \
+ <${FILESDIR}/Makefile.in > ${WRKSRC}/Makefile
+ (cd ${WRKSRC}; make configure)
+
+do-install:
+ ${CAT} ${PKGDIR}/PLIST.pre >${PLIST_SRC}
+ ${MKDIR} ${ZOPEDIR}
+ (cd ${WRKSRC}; pax -r -w -s'/.*\.[cho]$$//' . ${ZOPEDIR})
+ ${PREFIX}/bin/python \
+ ${PREFIX}/lib/python1.5/compileall.py ${ZOPEDIR}
+ chmod -R a+rX ${ZOPEDIR}
+ (cd ${PREFIX}; find zope -type f -print >>${PLIST_SRC})
+ (cd ${PREFIX}; find -d zope -type d -print | \
+ ${SED} -e "s/^/@dirrm /" >>${PLIST_SRC})
+ ${SED} -e "s,/usr/pkg,${PREFIX}," \
+ <${FILESDIR}/zope-install.py >${PREFIX}/sbin/zope-install
+ chmod 755 ${PREFIX}/sbin/zope-install
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/zope/files/Makefile.in b/www/zope/files/Makefile.in
new file mode 100644
index 00000000000..1ce67d4eb36
--- /dev/null
+++ b/www/zope/files/Makefile.in
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile.in,v 1.1.1.1 1998/12/12 17:28:23 tsarna Exp $
+
+all: all-pcgi all-lib all-dt all-bobopos
+configure: configure-pcgi configure-lib configure-dt configure-bobopos
+
+configure-pcgi:
+ (cd pcgi; ./configure)
+
+all-pcgi:
+ (cd pcgi; make)
+
+configure-lib:
+ (cd lib/python; \
+ make -f Makefile.pre.in boot PYTHON=@PREFIX@/bin/python)
+
+all-lib:
+ (cd lib/python; make)
+
+configure-dt:
+ (cd lib/python/DocumentTemplate; \
+ make -f Makefile.pre.in boot PYTHON=python)
+
+all-dt:
+ (cd lib/python/DocumentTemplate; make)
+
+configure-bobopos:
+ (cd lib/python/BoboPOS; \
+ make -f Makefile.pre.in boot PYTHON=python)
+
+all-bobopos:
+ (cd lib/python/BoboPOS; make)
diff --git a/www/zope/files/md5 b/www/zope/files/md5
new file mode 100644
index 00000000000..14fbd54d4dd
--- /dev/null
+++ b/www/zope/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1998/12/12 17:28:23 tsarna Exp $
+
+MD5 (Zope-1.9.0b2-src.tar.gz) = 0a230f045f5380c12975d611a5e33f9e
diff --git a/www/zope/files/zope-install.py b/www/zope/files/zope-install.py
new file mode 100755
index 00000000000..ea232045594
--- /dev/null
+++ b/www/zope/files/zope-install.py
@@ -0,0 +1,177 @@
+#!/usr/pkg/bin/python
+#
+# $NetBSD: zope-install.py,v 1.1.1.1 1998/12/12 17:28:23 tsarna Exp $
+# $Endicor$
+#
+# Copyright (c) 1998 Endicor Technologies, Inc.
+# All rights reserved. Written by Ty Sarna <tsarna@endicor.com>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# This will have to do for now...
+
+import sys, os, re, getopt, string
+
+prefix = "/usr/pkg"
+cgidir = prefix + "/libexec/cgi-bin"
+apconf = prefix + "/etc/httpd/httpd.conf"
+zopedir = prefix + "/zope"
+zopevar = zopedir + "/var"
+zopedata = "/var/zope"
+
+def usage():
+ print 'usage: zope-install [-n] [-p perms] [-u user] [-g group] [-d dir] [-c cgidir] instancename'
+ print
+ print '\t-n\tshow what would be done, but don\'t actually do it'
+ print '\t-p\tmanager permissions, in the form'
+ print '\t\tusername:plaintextpassword[:domain-restrinction]'
+ print '\t\teg: "root:mypass" or "root:mypass:*.mydomain.com'
+ print '\t-u\tusername to run as, default to Apache\'s user'
+ print '\t-g\tgroupname to run as, default to Apache\'s group'
+ print '\t-d\tdirectory for instance, defaults to %s/instancename' % zopedata
+ print '\t-d\tdirectory for CGIs, defaults to %s' % cgidir
+
+ sys.exit(1)
+
+def exists(f):
+ e = 1
+ try:
+ os.stat(f)
+ except:
+ e = 0
+ return e
+
+def resourcefile(v):
+ resource = '''#!%(zopedir)s/pcgi/pcgi-wrapper
+PCGI_NAME=Main
+PCGI_MODULE_PATH=%(zopedir)s/lib/python/Main.py
+PCGI_PUBLISHER=%(zopedir)s/pcgi/pcgi_publisher.py
+PCGI_EXE=%(python)s
+PCGI_SOCKET_FILE=%(instvar)s/pcgi.soc
+PCGI_PID_FILE=%(instvar)s/pcgi.pid
+PCGI_ERROR_LOG=%(instvar)s/pcgi.log
+PCGI_DISPLAY_ERRORS=1
+BOBO_REALM=%(instance)s
+BOBO_DEBUG_MODE=1
+INSTANCE_HOME=%(dirname)s
+''' % v
+
+ return resource
+
+def GetApachePerms():
+ user = group = "?ERROR?"
+
+ rx = re.compile("^(User|Group)\\s([^\\s]+)")
+ f = open(apconf, "r")
+ for l in f.readlines():
+ m = rx.match(l)
+ if m:
+ if m.group(1) == "User":
+ user = m.group(2)
+ if m.group(1) == "Group":
+ group = m.group(2)
+ return user, group
+
+def runsys(pretend, cmd):
+ if pretend:
+ print cmd
+ else:
+ r = os.system(cmd)
+ if r:
+ sys.exit(r)
+
+def createfile(pretend, fname, contents):
+ if pretend:
+ print "cat >%(fname)s <__EOF__\n%(contents)s__EOF__" % vars()
+ else:
+ f = open(fname, "w")
+ f.write(contents)
+ f.close()
+
+if __name__ == "__main__":
+ optlist, args = getopt.getopt(sys.argv[1:], 'np:u:g:d:')
+ if len(args) != 1:
+ usage()
+
+ instance = args[0]
+ user, group = GetApachePerms()
+ pretend = 0
+ seenperms = 0
+ perms = "root:password"
+ dirname = None
+ python = sys.executable
+
+ for (oname, oarg) in optlist:
+ if oname == '-n':
+ pretend = 1
+ elif oname == '-p':
+ perms = oarg
+ seenperms = 1
+ elif oname == '-u':
+ user = oarg
+ elif oname == '-g':
+ group = oarg
+ elif oname == '-d':
+ dirname = oarg
+ elif oname == '-c':
+ cgidir = oarg
+
+ if not dirname:
+ dirname = zopedata + '/' + instance
+
+ instvar = dirname + '/var'
+
+ runsys(pretend, "mkdir -p " + instvar)
+
+ if not exists(instvar + "/Data.bbb"):
+ runsys(pretend, "cp %(zopevar)s/Data.bbb.in %(instvar)s" % vars())
+
+ runsys(pretend, "chown -R %(user)s.%(group)s %(dirname)s" % vars())
+ runsys(pretend, "chmod -R u+rwX,g+rX,g-w,o-rwx %(dirname)s" % vars())
+
+ fname = dirname + "/access"
+ if not exists(fname):
+ if not seenperms:
+ sys.stderr.write("%s: warning: perms not set, dedaulting to %s\n"
+ % (sys.argv[0], perms))
+
+ createfile(pretend, fname, perms + '\n')
+
+ runsys(pretend,
+ "chmod 600 %(fname)s; chown %(user)s.%(group)s %(fname)s" % vars())
+
+ fname = cgidir + '/' + instance + ".cgi"
+ createfile(pretend, fname, resourcefile(vars()))
+ runsys(pretend,
+ "chmod 755 %(fname)s; chown %(user)s.%(group)s %(fname)s" % vars())
+
+ sys.stderr.write("""
+now you will need to add lines similar to these to your
+Apache srm.conf file to enable access to your instance
+via http://yourwebserver/instance/
+
+RewriteEngine on
+RewriteCond %%{HTTP:Authorization} ^(.*)
+RewriteRule ^/%(instance)s/(.*) %(cgidir)s/%(instance)s.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%%1,t=application/x-httpd-cgi,l]
+""" % vars())
diff --git a/www/zope/pkg/COMMENT b/www/zope/pkg/COMMENT
new file mode 100644
index 00000000000..1ff58a52e26
--- /dev/null
+++ b/www/zope/pkg/COMMENT
@@ -0,0 +1 @@
+Zope, the Z Object Publishing Environment
diff --git a/www/zope/pkg/DESCR b/www/zope/pkg/DESCR
new file mode 100644
index 00000000000..e2a02660136
--- /dev/null
+++ b/www/zope/pkg/DESCR
@@ -0,0 +1,19 @@
+Zope is a free, open source web application platform used for building
+high-performance, dynamic web sites.
+
+The Zope architecture competes in the web application server market
+against products such as Cold Fusion, Silverstream, Netscape Application
+Server, and the like. These products are aimed at systems programmers
+and relational databases. Zope, however, contains a powerful and simple
+scripting object model and high-performance, integrated object database.
+Thus the term "platform".
+
+Zope is divided into a number of systems, each described below. First,
+the Z Publisher provides object publishing that integrates with common
+web servers using a number of protocols, such as Zope's Persistent CGI.
+The Z Framework contains the foundation for the environment and builtin
+objects such as folders, documents, and images. The Z Template system
+provides dynamic page generation. The Z Object Database gives an
+advanced storage system that integrates tightly with Zope's web object
+model. Finally, Z SQL Methods and Z Database Adapters provide
+object-relational integration of data in popular SQL servers
diff --git a/www/zope/pkg/MESSAGE b/www/zope/pkg/MESSAGE
new file mode 100644
index 00000000000..b7dfc1ffb10
--- /dev/null
+++ b/www/zope/pkg/MESSAGE
@@ -0,0 +1,11 @@
+==============================================================================
+
+Zope is now installed.
+
+The command "zope-install" will create instances of Zope for use with
+Apache. Run it without any arguments for help and usage information.
+
+Alternately, you can run Zope standalone with ZopeHTTPServer.
+See the included documentation for information.
+
+==============================================================================
diff --git a/www/zope/pkg/PLIST.pre b/www/zope/pkg/PLIST.pre
new file mode 100644
index 00000000000..e21ff998e05
--- /dev/null
+++ b/www/zope/pkg/PLIST.pre
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.pre,v 1.1.1.1 1998/12/12 17:28:23 tsarna Exp $
+sbin/zope-install