# $Id: Portfile,v 1.5 2004/03/15 19:15:10 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 homepage http://www.zphotoslides.org/ master_sites sourceforge:zphotoslides dist_subdir zope/${name} set prodname ZPhotoSlides distname ${prodname}-${version} checksums md5 c2be3084f144ecfe1a97b4b6439fe659 worksrcdir ${prodname} # 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 patchfiles patch-__init__.py post-patch { reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/ZPhotoSlides.py } use_configure no pre-build { file copy ${zopehome}/bin/compilezpy.py ${workpath} reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm" cd ${worksrcpath} file rename -force batch_slides.py batch_slides.py.txt } build { system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py" } post-build { cd ${worksrcpath} file rename -force batch_slides.py.txt 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 products xinstall -d -m 0755 ${destroot}${zopeprod} system "cp -R ${workpath}/${prodname} ${destroot}${zopeprod}" if {$env(USER) == "root"} { system "chown -R ${zopeuser} ${destroot}${zopehome}" system "chgrp -R ${zopegroup} ${destroot}${zopehome}" } }