Ticket #30284: Portfile

File Portfile, 3.1 KB (added by cirrusj@…, 13 years ago)

bind9 portfile

Line 
1# $Id: Portfile 80632 2011-07-16 02:38:17Z dluke@macports.org $
2
3PortSystem 1.0
4
5name                    bind9
6version                 9.8.0-P4
7
8categories              net
9maintainers             geeklair.net:dluke
10platforms               darwin freebsd sunos
11
12description             Domain Name System server
13# license is actually ISC, a BSD style license, though.
14# see http://www.isc.org/software/license
15license                 BSD
16
17long_description        The BIND DNS Server is used on the vast majority of name \
18                                serving machines on the Internet, providing a robust \
19                                and stable architecture on top of which an \
20                                organization's naming architecture can be built. The \
21                                resolver library included in the BIND distribution \
22                                provides the standard APIs for translation between domain names \
23                                and Internet addresses and is intended to be linked with applications \
24                                requiring name service.
25
26homepage                http://www.isc.org
27
28distname                bind-${version}
29master_sites            isc:${name}/${version}
30
31checksums       md5     13e36e3f28dc1ce7675b45a4192e8389 \
32                sha1    969864200c1516a8bea54266de60f316d79182b4 \
33                rmd160  cd44fe00d5f052ab441c16b2e735ad5771b4230a
34               
35depends_lib             port:openssl port:libxml2
36
37use_parallel_build      no
38universal_variant       no
39
40test.run                yes
41test.target             test
42
43startupitem.create      yes
44startupitem.netchange   yes
45startupitem.executable  ${prefix}/sbin/named -f
46
47configure.env           STD_CDEFINES=-DDIG_SIGCHASE=1
48
49configure.args          --mandir=${prefix}/share/man \
50                                --with-openssl=${prefix} \
51                                --with-libxml2=${prefix} \
52                                --enable-threads \
53                                --enable-ipv6
54
55patchfiles      patch-lib-isc-unix-include-isc-net.h
56
57post-destroot   {
58        # Ensure needed directories
59        xinstall -m 755 -d \
60                ${destroot}${prefix}/var/named \
61                ${destroot}${prefix}/var/run
62       
63        # Install the conf file as a sample
64        xinstall -o root -m 644 ${filespath}/named.conf \
65                ${destroot}${prefix}/etc/named.conf.dist
66        reinplace "s|%%PREFIX%%|${prefix}|g" \
67                ${destroot}${prefix}/etc/named.conf.dist
68       
69        # Install the db files as samples
70        foreach f "db.127.0.0 db.cache db.localhost" {
71                xinstall -o root -m 644 ${filespath}/${f} \
72                        ${destroot}${prefix}/var/named/${f}.dist
73        }
74
75        destroot.keepdirs ${destroot}${prefix}/var/run
76}
77
78notes "******************************************************
79* To setup named to run, you need to copy named.conf.dist
80* to named.conf:
81* sudo cp ${prefix}/etc/named.conf.dist ${prefix}/etc/named.conf
82* and edit as needed. If you use the default zone files for
83* 127.0.0, localhost, and the cache, you also need to copy
84* those files:
85* sudo cp ${prefix}/var/named/db.127.0.0.dist ${prefix}/var/named/db.127.0.0
86* sudo cp ${prefix}/var/named/db.cache.dist ${prefix}/var/named/db.cache
87* sudo cp ${prefix}/var/named/db.localhost.dist ${prefix}/var/named/db.localhost
88******************************************************"
89
90variant dlz_mysql5 description {Dynamically Loaded Zones (dlz) stored in MySQL 5.x} {
91        depends_lib-append \
92                path:bin/mysql_config5:mysql5
93        patchfiles-append patch-configure
94        patchfiles-append patch-contrib-dlz-config.dlz.in
95        # Threads are not safe when bind9 is compiled with dlz
96        configure.args-delete \
97                --enable-threads
98        configure.args-append \
99                --with-dlz-mysql=${prefix}/bin/mysql_config5 \
100                --disable-threads
101}