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

Last change on this file since 5861 was 5861, checked in by rshaw, 16 years ago

Changed dist_subdir to be just "zope" like other current Zope ports and as
discussed on darwinports@.
Submitted by: rshaw

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1# $Id: Portfile,v 1.6 2004/03/19 08:00:15 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
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 Zope
37depends_build   path:${zopehome}:zope
38
39# Depends on these Zope products, Python modules, and external programs
40depends_run             path:${zopeprod}/Localizer:zope-localizer \
41                                path:${zopeprod}/stripogram:zope-stripogram \
42                                path:${pythonlib}/site-packages/PIL:py-pil \
43                                bin:convert:ImageMagick
44
45patchfiles              patch-__init__.py
46post-patch {
47        reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/ZPhotoSlides.py
48}
49
50use_configure   no
51
52pre-build {
53        file copy ${zopehome}/bin/compilezpy.py ${workpath}
54        reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py
55        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
56        cd ${worksrcpath}
57        file rename -force batch_slides.py batch_slides.py.txt
58}
59
60build {
61        system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py"
62}
63
64post-build {
65        cd ${worksrcpath}
66        file rename -force batch_slides.py.txt batch_slides.py
67}
68
69destroot {
70        if {$env(USER) != "root"} {
71                ui_msg "------------------------------------------------------------"
72                ui_msg "Note that you are not installing as root, so files installed"
73                ui_msg "by this port will not end up with proper ownership and"
74                ui_msg "likely not work correctly with Zope."
75                ui_msg "------------------------------------------------------------"
76        }
77
78        # Install products
79        xinstall -d -m 0755 ${destroot}${zopeprod}
80        system "cp -R ${workpath}/${prodname} ${destroot}${zopeprod}"
81        if {$env(USER) == "root"} {
82                system "chown -R ${zopeuser} ${destroot}${zopehome}"
83                system "chgrp -R ${zopegroup} ${destroot}${zopehome}"
84        }
85}
86
Note: See TracBrowser for help on using the repository browser.