source: trunk/dports/www/varnish/Portfile

Last change on this file was 121139, checked in by snc@…, 3 years ago

varnish: replace epoch, #39477

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 121139 2014-06-18 17:01:35Z ryandesign@macports.org $
3
4PortSystem            1.0
5
6name                  varnish
7epoch                 20110709
8version               3.0.4
9categories            www
10platforms             darwin
11maintainers           wohner.eu:normen
12license               BSD
13
14description           Varnish is a state-of-the-art, high-performance HTTP accelerator
15long_description      Varnish was written from the ground up to be a high \
16                      performance caching reverse proxy.
17
18homepage              http://www.varnish-cache.org
19master_sites          http://repo.varnish-cache.org/source/
20
21checksums             rmd160  ed8aba21af17d5fee225eb03950fd90ad7b07911 \
22                      sha256  4e044ccb5c76222bddf89c808f13ea8f66977972675aecb48a920f6800ad0f79
23
24depends_build         port:pkgconfig \
25                      port:py27-docutils
26
27depends_lib           port:pcre
28
29configure.args-append --with-rst2man=${prefix}/bin/rst2man-2.7.py
30
31startupitem.create    yes
32startupitem.pidfile   auto "${prefix}/var/run/${name}/${name}.pid"
33startupitem.start     "${prefix}/share/${name}/varnish.init start"
34startupitem.stop      "${prefix}/share/${name}/varnish.init stop"
35startupitem.restart   "${prefix}/share/${name}/varnish.init restart"
36
37post-destroot {
38    # create dir
39    xinstall -d -m 755 ${destroot}${prefix}/share/${name}
40
41    # copy files
42    xinstall -m 644 ${filespath}/varnish.conf.in ${destroot}${prefix}/etc/${name}/varnish.conf.default
43    xinstall -m 755 ${filespath}/varnish.init.in ${destroot}${prefix}/share/${name}/${name}.init
44    xinstall -m 755 ${filespath}/varnish-vcl-reload.in ${destroot}${prefix}/sbin/varnish-vcl-reload
45
46    # replace @PREFIX@ to ${prefix}
47    reinplace "s|@PREFIX@|${prefix}|g" \
48        ${destroot}${prefix}/etc/${name}/varnish.conf.default \
49        ${destroot}${prefix}/share/${name}/${name}.init \
50        ${destroot}${prefix}/sbin/varnish-vcl-reload
51
52    file rename ${destroot}${prefix}/etc/${name}/default.vcl ${destroot}${prefix}/etc/${name}/default.vcl.default
53}
54
55post-activate {
56    if {![file exists ${prefix}/etc/${name}/default.vcl]} {
57        file copy ${prefix}/etc/${name}/default.vcl.default \
58            ${prefix}/etc/${name}/default.vcl
59    }
60    if {![file exists ${prefix}/etc/${name}/varnish.conf]} {
61        file copy ${prefix}/etc/${name}/varnish.conf.default \
62            ${prefix}/etc/${name}/varnish.conf
63    }
64
65    # dirs nedded to run varnish
66    xinstall -d -m 755 -o nobody -g nobody ${prefix}/var/${name}
67    xinstall -d -m 755 -o nobody -g nobody ${prefix}/var/run/${name}
68}
69
70livecheck.url      ${master_sites}
71livecheck.type     regex
72livecheck.regex    ${name}-(\\d+\\.\\d+\\.\\d+).tar.gz
Note: See TracBrowser for help on using the repository browser.