source: trunk/dports/zope/zope-cvsfile/Portfile @ 5549

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

Zope product CVSFile

Submitted by: rshaw

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1# $Id: Portfile,v 1.1 2004/02/23 05:22:31 rshaw Exp $
2PortSystem 1.0
3
4name                    zope-cvsfile
5version                 0.9.0
6categories              www zope python
7maintainers             rshaw@opendarwin.org
8description             This is the CVSFile Zope Product.
9long_description        The CVSFile package is a Zope product.  CVSFile \
10                                        allows one to use CVS as a version control system \
11                                        for Zope content.  The developer creates a CVSFile, \
12                                        pointing to a file in the developer's CVS Sandbox on \
13                                        the Zope server.  Other Zope objects are able to \
14                                        access the content, but it is actually stored on the \
15                                        disk, rather than in the ZODB.  CVSFile enables the \
16                                        user to modify the file and do simple CVS commands. \
17                                        CVSFile inherits from ExternalFile \
18                                        (http://www.zope.org/Members/arielpartners/ExternalFile), \
19                                        a Zope product that behaves like a standard Zope \
20                                        object like File, Page Template,or DTMLMethod, but \
21                                        points to external content in the filesystem.
22platforms               darwin freebsd
23homepage                http://zope.org/Members/arielpartners/CVSFile
24master_sites    http://zope.org/Members/arielpartners/CVSFile/${version}/
25dist_subdir             zope/${name}
26distname                CVSFile
27extract.suffix  .zip
28use_zip                 yes
29distfiles               ${distname}-[strsed ${version} {g/[.]/-/}]${extract.suffix}
30checksums               md5 e2841081d9b038c8a1acee97ff4b0e17
31
32# Use Python 2.3 from DarwinPorts explicitly
33set python              ${prefix}/bin/python2.3
34
35# Location to install Zope products and the Zope user                 
36set zopehome    ${prefix}/libexec/Zope
37set zopeinst    ${prefix}/www/Zope
38set zopeprod    ${zopehome}/lib/python/Products
39set zopeuser    zope
40set zopegroup   www
41
42# Depends on Zope
43depends_build   path:${zopehome}:zope
44
45# Depends on these Zope products and binaries
46depends_run             path:${zopeprod}/ExternalFile:zope-externalfile \
47                                bin:cvs:cvs
48
49use_configure   no
50
51pre-build {
52        file copy ${zopehome}/bin/compilezpy.py ${workpath}
53        reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py
54        reinplace "s|'tests'|& and name != 'extras'|" ${workpath}/compilezpy.py
55        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
56        system "find ${worksrcpath} -type d -name CVS | xargs rm -rf"
57}
58
59build {
60        system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py"
61}
62
63destroot {
64        if {$env(USER) != "root"} {
65                ui_msg "------------------------------------------------------------"
66                ui_msg "Note that you are not installing as root, so files installed"
67                ui_msg "by this port will not end up with proper ownership and"
68                ui_msg "likely not work correctly with Zope."
69                ui_msg "------------------------------------------------------------"
70        }
71
72        # Install products
73        xinstall -d -m 0755 ${destroot}${zopeprod}
74        system "cp -R ${workpath}/${distname} ${destroot}${zopeprod}"
75        if {$env(USER) == "root"} {
76                system "chown -R ${zopeuser} ${destroot}${zopehome}"
77                system "chgrp -R ${zopegroup} ${destroot}${zopehome}"
78        }
79}
80
Note: See TracBrowser for help on using the repository browser.