source: trunk/dports/www/yaws/Portfile @ 62092

Last change on this file since 62092 was 62092, checked in by ryandesign@…, 10 years ago

yaws: simplify reinplaces

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 62092 2009-12-28 22:28:12Z ryandesign@macports.org $
3
4PortSystem                      1.0
5
6name                            yaws
7version                         1.85
8categories                      www
9maintainers                     nomaintainer
10platforms                       darwin
11description                     Webserver for dynamic content written in Erlang
12long_description        Yaws is a high performance HTTP server for dynamic content \
13                                        written in Erlang. Pages can be dynamic with embedded erlang \
14                                        code. Yaws also features a built-in Wiki.
15homepage                        http://yaws.hyber.org/
16master_sites            http://yaws.hyber.org/download/
17checksums                       md5 6941ea52638805246973bf94fd6e9a52 \
18                                        sha1 2d6bd52af002f356d6738900a67550c5531a0b4a \
19                                        rmd160 5be8e85019aade9d7e2213b981f27cc59995aecc
20
21depends_build           port:erlang
22
23extract.post_args       | tar -xf - --exclude \
24                                        "${name}-${version}/www/testdir/xx*xx.jpg"
25
26patchfiles                      patch-man-yaws.1 \
27                                        patch-man-yaws_api.5 \
28                                        patch-man-yaws.conf.5 \
29                                        patch-scripts-Install \
30                                        patch-scripts-Makefile \
31                                        patch-scripts-yaws.conf.template
32
33post-patch {
34        reinplace "s|__PREFIX|${prefix}|g" \
35                                        ${worksrcpath}/man/yaws.1 \
36                                        ${worksrcpath}/man/yaws.conf.5 \
37                                        ${worksrcpath}/man/yaws_api.5 \
38                                        ${worksrcpath}/scripts/yaws.conf.template
39}
40
41default_variants        +yapp
42
43configure.args          --sysconfdir=${prefix}/etc \
44                                        --localstatedir=${prefix}/var
45
46variant yapp description {Yapp application handler} {
47        post-build {
48                system "cd ${worksrcpath}/applications/yapp && make && make docs"
49        }
50        post-destroot {
51                system "cd ${worksrcpath}/applications/yapp && make install DESTDIR=${destroot}"
52        }
53}
54                                       
55post-destroot {
56        xinstall -d "${destroot}${prefix}/var/log/yaws/"
57        system "touch ${destroot}${prefix}/var/log/yaws/.turd"
58        file rename "${destroot}${prefix}/etc/yaws/yaws.conf" "${destroot}${prefix}/etc/yaws/yaws.conf.template"
59}
60
61post-install {
62        ui_msg "Copy and customize ${prefix}/etc/yaws/yaws.conf.template to ${prefix}/etc/yaws/yaws.conf"
63}
64
65startupitem.create      yes
66startupitem.name        yaws
67startupitem.start       "${prefix}/bin/yaws --daemon --heart --conf ${prefix}/etc/yaws/yaws.conf"
68startupitem.stop        "${prefix}/bin/yaws --stop"
69
70livecheck.type  regex
71livecheck.url   http://yaws.hyber.org/download/
72livecheck.regex {<address> Yaws (.*) Server at yaws.hyber.org </address>}
Note: See TracBrowser for help on using the repository browser.