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

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

ZPhotoSlides 1.2.1 for use with Zope 2.7

Submitted by: rshaw

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