--- /dev/null
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools user
+
+DESCRIPTION="A caching DNS proxy server"
+HOMEPAGE="http://dnrd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dnrd/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+PATCHES=( "${FILESDIR}"/${P}-docdir.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ keepdir /etc/dnrd
+ doinitd "${FILESDIR}"/dnrd
+ newconfd "${FILESDIR}"/dnrd.conf dnrd
+}
+
+pkg_postinst() {
+ enewgroup dnrd
+ enewuser dnrd -1 -1 /dev/null dnrd
+}
#!/sbin/openrc-run
-# Copyright 1999-2003 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2 or later
PIDFILE="/var/run/dnrd.pid"
start() {
ebegin "Starting dnrd"
- /usr/sbin/dnrd $DNRD_OPTS &> /dev/null &
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/dnrd \
+ -- ${DNRD_OPTS}
eend $?
}
stop() {
ebegin "Stopping dnrd"
- /usr/sbin/dnrd -k
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
eend $?
}
Index: doc/Makefile.am
===================================================================
---- doc/Makefile.am (revision 247)
-+++ doc/Makefile.am (revision 248)
+--- a/doc/Makefile.am (revision 247)
++++ b/doc/Makefile.am (revision 248)
@@ -1,5 +1,4 @@
PACKAGE = @PACKAGE_TARNAME@
-docdir = $(datadir)/doc/$(PACKAGE)
EXTRA_DIST = $(man_MANS) $(doc_DATA)
Index: Makefile.am
===================================================================
---- Makefile.am (revision 247)
-+++ Makefile.am (revision 248)
+--- a/Makefile.am (revision 247)
++++ b/Makefile.am (revision 248)
@@ -1,6 +1,5 @@
PACKAGE = @PACKAGE_TARNAME@
SUBDIRS = src doc