# $Id: Portfile,v 1.7 2004/03/20 06:16:59 rshaw Exp $ PortSystem 1.0 name zope-zphotoslides version 1.3 categories www zope python graphics maintainers rshaw@opendarwin.org description Zope web photo gallery product long_description ZPhotoSlides is a web photo gallery for the \ dynamic web-based server Zope. ZPhotoSlides will \ help you to show to all your friends and familly \ your best photos in a nice environment, to \ thumbnailize them, modify them (Apply filters, \ rotate, resize...) within your browser and \ accessible wherever you are. platforms darwin freebsd set prodname ZPhotoSlides homepage http://www.zphotoslides.org/ master_sites sourceforge:zphotoslides dist_subdir zope distname ${prodname}-${version} checksums md5 c2be3084f144ecfe1a97b4b6439fe659 # 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, Python modules, and external programs depends_run path:${zopeprod}/Localizer:zope-localizer \ path:${zopeprod}/stripogram:zope-stripogram \ path:${pythonlib}/site-packages/PIL:py-pil \ bin:convert:ImageMagick platform freebsd { extract.post_args | gtar -xf - } 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" } patchfiles patch-__init__.py post-patch { reinplace "s|/usr/local|${prefix}|" \ ${worksrcpath}/${prodname}/ZPhotoSlides.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" file rename -force ${worksrcpath}/${prodname}/batch_slides.py \ ${worksrcpath}/${prodname}/batch_slides.py.txt system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py" file rename -force ${worksrcpath}/${prodname}/batch_slides.py.txt \ ${worksrcpath}/${prodname}/batch_slides.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}" } }