source: trunk/dports/zope/zope-zphotoslides/Portfile @ 5825

Last change on this file since 5825 was 5825, checked in by rshaw, 17 years ago

Updated to latest release 1.3.
No longer depends/uses the semi-broken LocalFS product.

Submitted by: rshaw

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1# $Id: Portfile,v 1.3 2004/03/15 18:13:23 rshaw Exp $
2PortSystem 1.0
3
4name                    zope-zphotoslides
5version                 1.3
6categories              www zope python graphics
7maintainers             rshaw@opendarwin.org
8description             Zope web photo gallery product
9long_description        ZPhotoSlides is a web photo gallery for the \
10                                        dynamic web-based server Zope. ZPhotoSlides will \
11                                        help you to show to all your friends and familly \
12                                        your best photos in a nice environment, to \
13                                        thumbnailize them, modify them (Apply filters, \
14                                        rotate, resize...) within your browser and \
15                                        accessible wherever you are.
16platforms               darwin
17homepage                http://www.zphotoslides.org/
18master_sites    sourceforge:zphotoslides
19dist_subdir             zope/${name}
20set prodname    ZPhotoSlides
21distname                ${prodname}-${version}
22checksums               md5 c2be3084f144ecfe1a97b4b6439fe659
23worksrcdir              ${prodname}
24
25# Use Python 2.3 from DarwinPorts explicitly
26set python              ${prefix}/bin/python2.3
27set pythonlib   ${prefix}/lib/python2.3
28
29# Location to install Zope products and the Zope user                 
30set zopehome    ${prefix}/libexec/Zope
31set zopeinst    ${prefix}/www/Zope
32set zopeprod    ${zopehome}/lib/python/Products
33set zopeuser    zope
34set zopegroup   www
35
36# Depends on Python and Zope
37depends_build   path:${python}:python23 \
38                                path:${zopehome}:zope
39
40# Depends on these Zope products and other ports
41depends_run             path:${zopeprod}/Localizer:zope-localizer \
42                                path:${zopeprod}/stripogram:zope-stripogram \
43                                path:${pythonlib}/site-packages/PIL:py-pil \
44                                bin:convert:ImageMagick
45
46patchfiles              patch-__init__.py
47post-patch {
48        reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/ZPhotoSlides.py
49}
50
51use_configure   no
52
53pre-build {
54        file copy ${zopehome}/bin/compilezpy.py ${workpath}
55        reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py
56        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
57        cd ${worksrcpath}
58        file rename -force batch_slides.py batch_slides.py.txt
59}
60
61build {
62        system "cd ${worksrcpath} && \
63                ${python} -W ignore:'import * only' ${workpath}/compilezpy.py"
64}
65
66post-build {
67        cd ${worksrcpath}
68        file rename -force batch_slides.py.txt batch_slides.py
69}
70
71destroot {
72        if {$env(USER) != "root"} {
73                ui_msg "------------------------------------------------------------"
74                ui_msg "Note that you are not installing as root, so files installed"
75                ui_msg "by this port will not end up with proper ownership and"
76                ui_msg "likely not work correctly with Zope."
77                ui_msg "------------------------------------------------------------"
78        }
79
80        # Install products
81        xinstall -d -m 0755 ${destroot}${zopeprod}
82        system "cp -R ${workpath}/${prodname} ${destroot}${zopeprod}"
83        if {$env(USER) == "root"} {
84                system "chown -R ${zopeuser} ${destroot}${zopehome}"
85                system "chgrp -R ${zopegroup} ${destroot}${zopehome}"
86        }
87}
88
Note: See TracBrowser for help on using the repository browser.