source: trunk/dports/zope/zope-localfs/Portfile @ 5878

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

Updates Portfile format/code to match newer Zope product ports.
Adds "cvs" variant to build bleeding egde version of product.
No installed files change, no revision bump required.

Submitted by: rshaw

  • Property svn:eol-style set to native
File size: 3.1 KB
Line 
1# $Id: Portfile,v 1.4 2004/03/20 04:54:53 rshaw Exp $
2PortSystem 1.0
3
4name                    zope-localfs
5version                 1.1.0
6revision                1
7categories              www zope python
8maintainers             rshaw@opendarwin.org
9description             Zope Local File System folder
10long_description        The Local File System is an add-in product for \
11                                        the Zope web application server. It allows users \
12                                        to access the contents of the file system on a \
13                                        Zope server as if they were contained in the \
14                                        Zope Object Database. It allows you to serve \
15                                        files and browse directories from the local file \
16                                        system (or network shares on Windows platforms). \
17                                        It also allows you to upload files to the file \
18                                        system.
19platforms               darwin freebsd
20set prodname    LocalFS
21homepage                http://sourceforge.net/projects/localfs
22master_sites    sourceforge:localfs
23dist_subdir             zope
24distname                ${prodname}-[strsed ${version} {g/[.]/-/}]
25extract.suffix  .tgz
26checksums               md5 738c05ad9e4cb59518269bc21fa79a1d
27
28# Use Python 2.3 from DarwinPorts explicitly
29set python              ${prefix}/bin/python2.3
30set pythonlib   ${prefix}/lib/python2.3
31
32# Location to install Zope products and the Zope user                 
33set zopehome    ${prefix}/libexec/Zope
34set zopeinst    ${prefix}/www/Zope
35set zopeprod    ${zopehome}/lib/python/Products
36set zopeuser    zope
37set zopegroup   www
38
39# Depends on Zope
40depends_build   path:${zopehome}:zope
41
42# Depends on these Zope products
43# none
44
45platform freebsd {
46        extract.post_args       | gtar -xf -
47}
48extract.dir             ${worksrcpath}
49pre-extract {
50        file mkdir ${worksrcpath}
51}
52post-extract {
53        if {[file exist ${worksrcpath}/lib/python/Products/${prodname}]} {
54                file rename ${worksrcpath}/lib/python/Products/${prodname} \
55                        ${worksrcpath}/${prodname}
56        }
57        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
58        system "find ${worksrcpath} -type d -name CVS | xargs rm -rf"
59}
60
61patchfiles              patch-FSObject.py
62
63use_configure   no
64
65build {
66        file copy -force ${zopehome}/bin/compilezpy.py ${workpath}
67        reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py
68        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
69        system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py"
70}
71
72destroot {
73        if {$env(USER) != "root"} {
74                ui_msg "------------------------------------------------------------"
75                ui_msg "Note that you are not installing as root, so files installed"
76                ui_msg "by this port will not end up with proper ownership and"
77                ui_msg "likely not work correctly with Zope."
78                ui_msg "------------------------------------------------------------"
79        }
80
81        # Install product
82        xinstall -d -m 0755 ${destroot}${zopeprod}
83        system "cp -R ${worksrcpath}/${prodname} ${destroot}${zopeprod}"
84        if {$env(USER) == "root"} {
85                system "chown -R ${zopeuser} ${destroot}${zopehome}"
86                system "chgrp -R ${zopegroup} ${destroot}${zopehome}"
87        }
88}
89
90variant cvs {
91        version         [clock format [clock seconds] -format %Y%m%d]
92        distname        ${prodname}-${version}
93
94        fetch.type      cvs
95        cvs.root        :pserver:anonymous@cvs.sourceforge.net:/cvsroot/localfs
96        cvs.module      src/lib/python/Products/${prodname}
97        cvs.args        -d ${prodname}
98        cvs.dir         ${worksrcpath}
99        pre-fetch {
100                file mkdir ${worksrcpath}
101        }
102
103        patchfiles      patch-FSObject.py-cvs
104}
105
Note: See TracBrowser for help on using the repository browser.