source: trunk/dports/net/unbound/Portfile

Last change on this file was 153591, checked in by snc@…, 9 months ago

unbound: update to 1.5.10

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 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 153591 2016-10-05 03:24:09Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                unbound
7version             1.5.10
8categories          net
9license             BSD
10maintainers         snc
11
12description         Validating, recursive, and caching DNS resolver.
13
14homepage            http://unbound.net/
15platforms           darwin
16depends_lib         path:lib/libssl.dylib:openssl port:expat
17
18set unbounduser     unbound
19set unboundgroup    unbound
20
21long_description    Unbound is a validating, recursive, and caching DNS \
22                    server software product from NLnet Labs, VeriSign Inc.,\
23                    Nominet, and Kirei. It is distributed free of charge \
24                    in open source form under the BSD license.\
25                    Unbound is designed as a set of modular components \
26                    that incorporate modern features, such as enhanced \
27                    security (DNSSEC) validation, Internet Protocol \
28                    Version 6 (IPv6), and a client resolver library API \
29                    as an integral part of the architecture.
30
31master_sites        http://unbound.net/downloads/
32
33checksums           rmd160  0907f1501acc5ce943a038f671ef0e7d358b0695 \
34                    sha256  a39b8b4fcca2a2b35a2daa53fe35150cc3f09038dc9acede09c912fc248a9486
35
36configure.args-append   --with-pidfile=${prefix}/var/run/${name}/${name}.pid \
37                        --with-ssl=${prefix} \
38                        --with-rootkey-file=${prefix}/etc/${name}/root.key
39
40if {${os.major} == 10} {
41        configure.compiler  macports-clang-3.4
42}
43
44variant libevent description {Build with libevent (slower, but allows use of large outgoing port ranges)} {
45    depends_lib-append      port:libevent
46    configure.args-append   --with-libevent=${prefix}
47}
48
49test.run            yes
50
51add_users ${unbounduser} group=${unboundgroup} home=/dev/null realname=Unbound\ Resolver
52post-destroot {
53    xinstall -o ${unbounduser} -g ${unboundgroup} -m 755 -d ${destroot}${prefix}/var/run/${name}
54    move ${destroot}${prefix}/etc/${name}/${name}.conf ${destroot}${prefix}/etc/${name}/${name}.conf-dist
55    reinplace -W ${destroot}${prefix}/etc/${name} "s/# auto-trust-anchor-file:/auto-trust-anchor-file:/g" ${name}.conf-dist
56    touch ${destroot}${prefix}/var/run/${name}/${name}.pid
57    file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser} -group ${unboundgroup}
58    file attributes ${destroot}${prefix}/etc/${name} -group ${unboundgroup} -permissions 0775
59}
60
61post-activate {
62    system "${prefix}/sbin/unbound-anchor -a \"${prefix}/etc/${name}/root.key\" || :"
63    file attributes ${prefix}/etc/${name}/root.key -owner ${unbounduser} -group ${unboundgroup}
64}
65
66# Make it run on boot
67startupitem.create  yes
68startupitem.name    unbound
69startupitem.start   "${prefix}/sbin/unbound-anchor -a ${prefix}/etc/${name}/root.key || : && chown ${unbounduser}:${unboundgroup} ${prefix}/etc/${name}/root.key && ${prefix}/sbin/unbound"
70startupitem.stop    "/bin/kill \$(cat ${prefix}/var/run/${name}/unbound.pid)"
71
72livecheck.type      regex
73livecheck.url       ${homepage}/download.html
74livecheck.regex     "The latest version of unbound \\(currently (\\d+\\.\\d+(\\.\\d+))\\)"
75
76use_parallel_build  no
77
78notes-append        "An example configuration is provided at ${prefix}/etc/${name}/${name}.conf-dist."
Note: See TracBrowser for help on using the repository browser.