source: trunk/dports/www/zope/Portfile @ 3456

Last change on this file since 3456 was 3456, checked in by wbb4, 17 years ago

Bug: 923
Submitted by: robert@…
Reviewed by: wbb4@…
Approved by:
Obtained from:

Update Zope to 2.6.2

  • Property svn:eol-style set to native
File size: 4.4 KB
Line 
1# Zope Portfile ###############################################################
2# $Id: Portfile,v 1.3 2003/09/19 12:06:40 wbb4 Exp $
3
4PortSystem          1.0
5name                zope
6version             2.6.2
7revision            1
8categories          www python zope
9maintainers         wbb4@opendarwin.org
10description         Object-Oriented Python Web Application Server
11long_description \
12Zope is a leading open source application server, specializing in content \
13management, portals, and custom applications.
14platforms           darwin
15homepage            http://www.zope.org
16master_sites        http://www.zope.org/Products/Zope/${version}/${version}
17distname            Zope-${version}-src
18distfiles           Zope-${version}-src.tgz
19checksums           md5 a0e873d54994231d7c03640f7092a4fb
20depends_build       bin:python2.1:python21
21depends_run         path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
22extract.post_args   | gnutar -xf -
23configure           { }
24
25set python          /usr/bin/env\ python2.1
26build.cmd           ${python}
27build.target        w_pcgi.py
28build.env           ZDIR=${prefix}/www/Zope
29
30# Default Zope User and Password.  The password is changed from what is
31# printed durring the build, as the user will not see that by default.
32set defuser         admin
33set defpasswd       mypass
34
35# Location to install Zope and the Zope user
36set zopebase        ${destroot}${prefix}/www/Zope
37set zopeuser        zope
38
39pre-destroot {
40    # Set the default user's password
41    system          "cd ${worksrcpath} && ${python} zpasswd.py \
42                    -u ${defuser} -p ${defpasswd} inituser"
43
44    # Clean up before install
45    system          "cd ${worksrcpath}/pcgi/Test && rm -rf *.o"
46    system          "cd ${worksrcpath}/pcgi && rm -rf *.o"
47    system          "cd ${worksrcpath}/lib/python && rm -rf build"
48
49    # Add a 'zope' user
50    adduser ${zopeuser} gid=[existsgroup www] realname=Zope\ Server
51}
52
53destroot {
54    system          "install -d ${destroot}${prefix}/bin"
55    system          "install -d ${destroot}${prefix}/etc/rc.d"
56    system          "install -d ${destroot}${prefix}/www/cgi-bin"
57    system          "install -d ${destroot}${prefix}/share/doc/Zope"
58    system          "install -d ${zopebase}"
59
60    # Copy the Zope tree
61    system          "cd ${worksrcpath}; cp -Rp * ${zopebase}"
62    reinplace       "s|${worksrcpath}|${prefix}/www/Zope|g" ${zopebase}/stop
63    system          "chown -R zope ${zopebase}"
64    system          "chgrp -R www ${zopebase}"
65    system          "cd ${zopebase} && chmod 1755 var"
66    system          "cd ${zopebase} && chown zope var/*"
67    system          "cd ${zopebase} && chmod 700 z2.py"
68    system          "cd ${zopebase} && chown root var"
69    system          "touch ${zopebase}/var/error.log"
70
71    # Copy the pcgi stuff
72    system          "cd ${zopebase} && mv Zope.cgi Zope.cgi.orig;
73                    echo '#! ${prefix}/www/cgi-bin/pcgi-wrapper' > Zope.cgi;
74                    cat Zope.cgi.orig >> Zope.cgi; rm -f Zope.cgi.orig"
75    system          "install -m 555 -c ${zopebase}/Zope.cgi \
76                    ${destroot}${prefix}/www/cgi-bin"
77    system          "install -m 555 -c ${zopebase}/pcgi/pcgi-wrapper \
78                    ${destroot}${prefix}/www/cgi-bin"
79    system          "install -m 755 -c ${filespath}/Apache-Zope.txt \
80                    ${destroot}${prefix}/www"
81
82    # Copy the zopectl and zope startup script
83    system          "install -m 755 -c ${filespath}/zopectl \
84                    ${destroot}${prefix}/bin/zopectl"
85    reinplace       "s|%%ZOPEBASE%%|${prefix}/www/Zope|g" \
86                    ${destroot}${prefix}/bin/zopectl
87    reinplace       "s|%%ZOPEUSER%%|${zopeuser}|g" \
88                    ${destroot}${prefix}/bin/zopectl
89    reinplace       "s|%%CGIBINDIR%%|${prefix}/www/cgi-bin|g" \
90                    ${destroot}${prefix}/bin/zopectl
91    system          "install -m 755 -c ${destroot}${prefix}/bin/zopectl \
92                    ${destroot}${prefix}/etc/rc.d/zope.sh"
93
94    # Copy Docs
95    system          "cp -R ${worksrcpath}/doc/* \
96                    ${destroot}${prefix}/share/doc/Zope"
97}
98
99post-install {
100    # Tell the user how to configure with Apache and what admin's pw is
101    ui_msg          "${UI_PREFIX} To configure Apache to use Zope.cgi, see\
102                    ${prefix}/www/Apache-Zope.txt"
103    ui_msg                  "${UI_PREFIX} The '${defuser}' user's password has been\
104                    set to '${defpasswd}'.  Please change it."
105}
Note: See TracBrowser for help on using the repository browser.