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

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

Updates Portfile format/code to match newer Zope product ports.
No installed files change, no revision bump required.

Submitted by: rshaw

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1# $Id: Portfile,v 1.7 2004/03/20 06:16:59 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 freebsd
17set prodname    ZPhotoSlides
18homepage                http://www.zphotoslides.org/
19master_sites    sourceforge:zphotoslides
20dist_subdir             zope
21distname                ${prodname}-${version}
22checksums               md5 c2be3084f144ecfe1a97b4b6439fe659
23
24# Use Python 2.3 from DarwinPorts explicitly
25set python              ${prefix}/bin/python2.3
26set pythonlib   ${prefix}/lib/python2.3
27
28# Location to install Zope products and the Zope user                 
29set zopehome    ${prefix}/libexec/Zope
30set zopeinst    ${prefix}/www/Zope
31set zopeprod    ${zopehome}/lib/python/Products
32set zopeuser    zope
33set zopegroup   www
34
35# Depends on Zope
36depends_build   path:${zopehome}:zope
37
38# Depends on these Zope products, Python modules, and external programs
39depends_run             path:${zopeprod}/Localizer:zope-localizer \
40                                path:${zopeprod}/stripogram:zope-stripogram \
41                                path:${pythonlib}/site-packages/PIL:py-pil \
42                                bin:convert:ImageMagick
43
44platform freebsd {
45        extract.post_args       | gtar -xf -
46}
47extract.dir             ${worksrcpath}
48pre-extract {
49        file mkdir ${worksrcpath}
50}
51post-extract {
52        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
53        system "find ${worksrcpath} -type d -name CVS | xargs rm -rf"
54}
55
56patchfiles              patch-__init__.py
57post-patch {
58        reinplace "s|/usr/local|${prefix}|" \
59                ${worksrcpath}/${prodname}/ZPhotoSlides.py
60}
61
62use_configure   no
63
64build {
65        file copy -force ${zopehome}/bin/compilezpy.py ${workpath}
66        reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py
67        system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm"
68        file rename -force ${worksrcpath}/${prodname}/batch_slides.py \
69                ${worksrcpath}/${prodname}/batch_slides.py.txt
70        system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py"
71        file rename -force ${worksrcpath}/${prodname}/batch_slides.py.txt \
72                ${worksrcpath}/${prodname}/batch_slides.py
73}
74
75destroot {
76        if {$env(USER) != "root"} {
77                ui_msg "------------------------------------------------------------"
78                ui_msg "Note that you are not installing as root, so files installed"
79                ui_msg "by this port will not end up with proper ownership and"
80                ui_msg "likely not work correctly with Zope."
81                ui_msg "------------------------------------------------------------"
82        }
83
84        # Install product
85        xinstall -d -m 0755 ${destroot}${zopeprod}
86        system "cp -R ${worksrcpath}/${prodname} ${destroot}${zopeprod}"
87        if {$env(USER) == "root"} {
88                system "chown -R ${zopeuser} ${destroot}${zopehome}"
89                system "chgrp -R ${zopegroup} ${destroot}${zopehome}"
90        }
91}
92
Note: See TracBrowser for help on using the repository browser.