# $Id: Portfile,v 1.3 2004/03/19 07:55:50 rshaw Exp $ PortSystem 1.0 name zope-externalfile version 1.2.0 categories www zope python maintainers rshaw@opendarwin.org description This is the ExternalFile Zope Product. long_description This is the ExternalFile Zope Product. It is similar \ to ExtFile (http://zope.org/Members/MacGregor/ExtFile), \ except that it references the file in situ, rather \ than copying it to a file system repository within \ the context of the Zope installation. It also \ supports in-browser editing for ASCII files. platforms darwin freebsd set prodname ExternalFile homepage http://zope.org/Members/arielpartners/${prodname} master_sites ${homepage}/${version}/ dist_subdir zope extract.suffix .zip use_zip yes distname ${prodname}-[strsed ${version} {g/[.]/-/}] checksums md5 b4da87c01e79970cb8bccf2848d88369 # Use Python 2.3 from DarwinPorts explicitly set python ${prefix}/bin/python2.3 # Location to install Zope products and the Zope user set zopehome ${prefix}/libexec/Zope set zopeinst ${prefix}/www/Zope set zopeprod ${zopehome}/lib/python/Products set zopeuser zope set zopegroup www # Depends on Zope depends_build path:${zopehome}:zope # Depends on these Zope products # none extract.dir ${worksrcpath} pre-extract { file mkdir ${worksrcpath} } post-extract { system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm" system "find ${worksrcpath} -type d -name CVS | xargs rm -rf" } use_configure no build { file copy -force ${zopehome}/bin/compilezpy.py ${workpath} reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py reinplace "s|'tests'|& and name != 'extras'|" ${workpath}/compilezpy.py system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm" system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py" } destroot { if {$env(USER) != "root"} { ui_msg "------------------------------------------------------------" ui_msg "Note that you are not installing as root, so files installed" ui_msg "by this port will not end up with proper ownership and" ui_msg "likely not work correctly with Zope." ui_msg "------------------------------------------------------------" } # Install product xinstall -d -m 0755 ${destroot}${zopeprod} system "cp -R ${worksrcpath}/${prodname} ${destroot}${zopeprod}" if {$env(USER) == "root"} { system "chown -R ${zopeuser} ${destroot}${zopehome}" system "chgrp -R ${zopegroup} ${destroot}${zopehome}" } }