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

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

yaws: don't need to reinplace in yaws_config.erl; its patch was deleted in r18685

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 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 62091 2009-12-28 22:27:01Z 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" ${worksrcpath}/man/yaws.1
35        reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/man/yaws.conf.5
36        reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/man/yaws_api.5
37        reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/scripts/yaws.conf.template
38}
39
40default_variants        +yapp
41
42configure.args          --sysconfdir=${prefix}/etc \
43                                        --localstatedir=${prefix}/var
44
45variant yapp description {Yapp application handler} {
46        post-build {
47                system "cd ${worksrcpath}/applications/yapp && make && make docs"
48        }
49        post-destroot {
50                system "cd ${worksrcpath}/applications/yapp && make install DESTDIR=${destroot}"
51        }
52}
53                                       
54post-destroot {
55        xinstall -d "${destroot}${prefix}/var/log/yaws/"
56        system "touch ${destroot}${prefix}/var/log/yaws/.turd"
57        file rename "${destroot}${prefix}/etc/yaws/yaws.conf" "${destroot}${prefix}/etc/yaws/yaws.conf.template"
58}
59
60post-install {
61        ui_msg "Copy and customize ${prefix}/etc/yaws/yaws.conf.template to ${prefix}/etc/yaws/yaws.conf"
62}
63
64startupitem.create      yes
65startupitem.name        yaws
66startupitem.start       "${prefix}/bin/yaws --daemon --heart --conf ${prefix}/etc/yaws/yaws.conf"
67startupitem.stop        "${prefix}/bin/yaws --stop"
68
69livecheck.type  regex
70livecheck.url   http://yaws.hyber.org/download/
71livecheck.regex {<address> Yaws (.*) Server at yaws.hyber.org </address>}
Note: See TracBrowser for help on using the repository browser.