Ticket #474: Portfile

File Portfile, 2.0 KB (added by wb@…, 21 years ago)

Portfile

Line 
1# Zope Portfile ###############################################################
2# $Id$
3
4PortSystem              1.0
5name                    zope
6version                 2.6.1
7revision                0
8categories              www python zope
9maintainers             wb@willbarton.com
10description             Object-Oriented Python Web Application Server
11long_description        Zope is a leading open source application server, \
12                        specializing in content management, portals, and \
13                        custom applications.
14platforms               darwin
15homepage                http://www.zope.org
16master_sites            http://www.zope.org/Products/Zope/${version}/
17distname                Zope-${version}-src
18distfiles               Zope-${version}-src.tgz
19checksums               md5 a17f36b86b6e489797d8e52f1ba48efe
20depends_lib             bin:python:python
21extract.post_args       | gnutar -xf -
22configure               { }
23
24# It would be nice to have a 2.1 port of python in addition to 2.2, this
25# port should DEFINITELY be considered experimental until then.
26set python              /usr/bin/env\ python
27build.cmd               ${python}
28build.target            wo_pcgi.py
29build.env               ZDIR=${prefix}/lib/${name}
30
31# Default Zope User and Password.  The password is changed from what is
32# printed durring the build, as the user will not see that by default.
33set defuser             admin
34set defpasswd           M1p4Ss 
35
36post-build {
37        system          "cd ${worksrcpath} && ${python} zpasswd.py \
38                        -u ${defuser} -p ${defpasswd} inituser"
39}
40
41install {
42        set path        ${destroot}${prefix}/lib/
43        set zopebase    ${path}${name}
44        system          "install -d ${path}"
45        system          "install -d ${zopebase}"
46        system          "cd ${worksrcpath}; cp -Rp * ${zopebase}"
47        system          "sed -e \"s,%%DPPATH%%,${prefix}/lib/${name},g\" \
48                        ${filespath}/zopectl > ${destroot}${prefix}/bin/zopectl"
49        system          "sed -e \"s,${worksrcpath},${prefix}/lib/$name,g\" \
50                        ${zopebase}/stop > ${zopebase}/stop.new; \
51                        mv ${zopebase}/stop.new ${zopebase}/stop;\
52                        chmod 755 ${zopebase}/stop"
53        system          "cd ${destroot}${prefix} && chmod 755 bin/zopectl"
54        system          "cd ${zopebase} && chmod -R 755 var"
55        system          "cd ${zopebase} && chmod 700 z2.py"
56
57        ui_msg          "The '${defuser}' user's password has been\
58                        set to '${defpasswd}'.  Please change it."
59        ui_msg          "You can use '${prefix}/bin/zopectl' to start\
60                        and stop Zope."
61}