1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs
8 DESCRIPTION="DNS serial number incrementer and reverse zone builder"
9 SRC_URI="http://uranus.it.swin.edu.au/~jn/linux/${P}.tar.gz"
10 HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
14 KEYWORDS="amd64 ppc x86"
17 RDEPEND="sys-apps/ed" # dnstouch calls ed to do the dirty work
21 eapply "${FILESDIR}"/${P}-binary-locations.patch
23 # match our bind config
24 sed -e 's|0.0.127.in-addr.arpa|127.in-addr.arpa|g' -i ndu.conf || die
25 # document the support for the chrooted BIND setup
26 cat >> ndu.conf <<-EOF || die
27 // if you use a chrooted setup, then you need to uncomment these lines:
28 //process "/chroot/dns/named.conf"
29 //chroot "/chroot/dns"
33 # use the correct compiler
34 sed -e 's|gcc|$(CXX)|g' -i Makefile || die
35 # set correct config pathes
36 sed -e 's|#define CONFIG_PATH "/etc/"|#define CONFIG_PATH "/etc/bind/"|g' \
38 sed -e 's|"/etc/ndu.conf"|"/etc/bind/ndu.conf"|g' -i dnstouch.cpp || die
39 # hack up something to work around bug #73858
40 sed -e 's|execlp("ed", "ed", filename, 0);|execlp("ed", "ed", "-s", filename, 0);|g' \
41 -i dnstouch.cpp || die
42 # use the correct editor
43 sed -e 's|VISUAL|EDITOR|g' -i dnsedit || die
47 emake -C src CFLAGS="${CFLAGS}" CXX="$(tc-getCXX)"
51 dobin src/{dnsedit,ndu,dnstouch}
58 elog "The ndu binary expects to read your configuration"
59 elog "from /etc/bind/named.conf, however the other binaries"
60 elog "are useful with BIND locally installed."