# $Id: Portfile,v 1.4 2004/03/20 04:54:53 rshaw Exp $ PortSystem 1.0 name zope-localfs version 1.1.0 revision 1 categories www zope python maintainers rshaw@opendarwin.org description Zope Local File System folder long_description The Local File System is an add-in product for \ the Zope web application server. It allows users \ to access the contents of the file system on a \ Zope server as if they were contained in the \ Zope Object Database. It allows you to serve \ files and browse directories from the local file \ system (or network shares on Windows platforms). \ It also allows you to upload files to the file \ system. platforms darwin freebsd set prodname LocalFS homepage http://sourceforge.net/projects/localfs master_sites sourceforge:localfs dist_subdir zope distname ${prodname}-[strsed ${version} {g/[.]/-/}] extract.suffix .tgz checksums md5 738c05ad9e4cb59518269bc21fa79a1d # Use Python 2.3 from DarwinPorts explicitly set python ${prefix}/bin/python2.3 set pythonlib ${prefix}/lib/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 platform freebsd { extract.post_args | gtar -xf - } extract.dir ${worksrcpath} pre-extract { file mkdir ${worksrcpath} } post-extract { if {[file exist ${worksrcpath}/lib/python/Products/${prodname}]} { file rename ${worksrcpath}/lib/python/Products/${prodname} \ ${worksrcpath}/${prodname} } system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm" system "find ${worksrcpath} -type d -name CVS | xargs rm -rf" } patchfiles patch-FSObject.py use_configure no build { file copy -force ${zopehome}/bin/compilezpy.py ${workpath} reinplace "s|^.*sys.stdout|#&|" ${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}" } } variant cvs { version [clock format [clock seconds] -format %Y%m%d] distname ${prodname}-${version} fetch.type cvs cvs.root :pserver:anonymous@cvs.sourceforge.net:/cvsroot/localfs cvs.module src/lib/python/Products/${prodname} cvs.args -d ${prodname} cvs.dir ${worksrcpath} pre-fetch { file mkdir ${worksrcpath} } patchfiles patch-FSObject.py-cvs }