source: trunk/dports/zope/zope-externalfile/Portfile @ 5547

Last change on this file since 5547 was 5547, checked in by rshaw, 16 years ago

Zope ExternalFile product port.

Submitted by: rshaw

  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1# $Id: Portfile,v 1.1 2004/02/23 05:21:07 rshaw Exp $
2PortSystem 1.0
3
4name                    zope-externalfile
5version                 1.2.0
6categories              www zope python
7maintainers             rshaw@opendarwin.org
8description             This is the ExternalFile Zope Product.
9long_description        This is the ExternalFile Zope Product.  It is similar \
10                                        to ExtFile (http://zope.org/Members/MacGregor/ExtFile), \
11                                        except that it references the file in situ, rather \
12                                        than copying it to a file system repository within \
13                                        the context of the Zope installation.  It also \
14                                        supports in-browser editing for ASCII files.
15platforms               darwin freebsd
16homepage                http://zope.org/Members/arielpartners/ExternalFile
17master_sites    http://zope.org/Members/arielpartners/ExternalFile/${version}/
18dist_subdir             zope/${name}
19distname                ExternalFile
20extract.suffix  .zip
21use_zip                 yes
22distfiles               ${distname}-[strsed ${version} {g/[.]/-/}]${extract.suffix}
23checksums               md5 b4da87c01e79970cb8bccf2848d88369
24
25# Use Python 2.3 from DarwinPorts explicitly
26set python              ${prefix}/bin/python2.3
27
28# Location to install Zope products and the Zope user                 
29set zopehome    ${prefix}/libexec/Zope
30set zopeinst    ${prefix}/www/Zope
31set zopeprod    ${zopehome}/lib/python/Products
32set zopeuser    zope
33set zopegroup   www
34
35# Depends on Zope
36depends_build   path:${zopehome}:zope
37
38use_configure   no
39
40pre-build {
41        file copy ${zopehome}/bin/compilezpy.py ${workpath}
42        reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py
43        reinplace "s|'tests'|& and name != 'extras'|" ${workpath}/compilezpy.py
44        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
45        system "find ${worksrcpath} -type d -name CVS | xargs rm -rf"
46}
47
48build {
49        system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py"
50}
51
52destroot {
53        if {$env(USER) != "root"} {
54                ui_msg "------------------------------------------------------------"
55                ui_msg "Note that you are not installing as root, so files installed"
56                ui_msg "by this port will not end up with proper ownership and"
57                ui_msg "likely not work correctly with Zope."
58                ui_msg "------------------------------------------------------------"
59        }
60
61        # Install products
62        xinstall -d -m 0755 ${destroot}${zopeprod}
63        system "cp -R ${workpath}/${distname} ${destroot}${zopeprod}"
64        if {$env(USER) == "root"} {
65                system "chown -R ${zopeuser} ${destroot}${zopehome}"
66                system "chgrp -R ${zopegroup} ${destroot}${zopehome}"
67        }
68}
69
Note: See TracBrowser for help on using the repository browser.