set client_lan_reverse_ip_address [exec /bin/sh -c "echo ${client_lan_ip_address} | /usr/bin/sed -E -e 's|(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\$|\\4.\\3.\\2.\\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
# use port:bind9's version as the version number
platforms darwin freebsd sunos
maintainers {ieee.org:s.t.smith @essandess} openmaintainer
description Domain Name System server configuration
DNS server working configuration for named that provides a basic,\
working, easily modifiable LAN DNS server. The configuration includes\
example LAN, .private, and localhost zones, with example A, PTR,\
and CNAME (alias) records, MX, SPF, DKIM, and DMARC records for email\
servers, and URI, TXT, and SRV records for Kerberos servers. This\
configuration is based upon macOS Server.app's VPN server prior to\
its deprecation in Server.app version 5.7. See `man named`.
homepage https://www.isc.org/
depends_run-append port:bind9
# Ensure needed directories
xinstall -o named -g named -m 755 -d \
${destroot}${prefix}/etc \
${destroot}${prefix}/var/named \
${destroot}${prefix}/var/log/named
# Install the conf file template
xinstall -o root -m 644 ${filespath}/named.conf \
${destroot}${prefix}/etc/named.conf.macports
# Install the db file templates
db.@LAN_REVERSE_IP_SUBNET@.in-addr.arpa \
xinstall -o named -g named -m 644 ${filespath}/${f} \
${destroot}${prefix}/var/named/${f}.macports
destroot.keepdirs ${destroot}${prefix}/var/log/named