commit:     3bb59b34fd805ca7e4c3c5d7c47d01a4b87e81ba
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Wed Oct  3 17:44:31 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct 19 22:34:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bb59b34

net-dns/dnrd: EAPI7 revbump, improve ebuild

Closes: https://bugs.gentoo.org/667660
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/10054
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 net-dns/dnrd/dnrd-2.20.3-r2.ebuild          | 34 +++++++++++++++++++++++++++++
 net-dns/dnrd/files/dnrd                     |  9 +++++---
 net-dns/dnrd/files/dnrd-2.20.3-docdir.patch |  8 +++----
 3 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/net-dns/dnrd/dnrd-2.20.3-r2.ebuild 
b/net-dns/dnrd/dnrd-2.20.3-r2.ebuild
new file mode 100644
index 00000000000..571076853a7
--- /dev/null
+++ b/net-dns/dnrd/dnrd-2.20.3-r2.ebuild
@@ -0,0 +1,34 @@
+# 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
+}

diff --git a/net-dns/dnrd/files/dnrd b/net-dns/dnrd/files/dnrd
index 9fb87107b7a..4fcc2112cf2 100644
--- a/net-dns/dnrd/files/dnrd
+++ b/net-dns/dnrd/files/dnrd
@@ -1,5 +1,5 @@
 #!/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"
@@ -11,13 +11,16 @@ depend() {
 
 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 $?
 }
 

diff --git a/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch 
b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
index a3d1c8002d5..fe0c0d347e7 100644
--- a/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
+++ b/net-dns/dnrd/files/dnrd-2.20.3-docdir.patch
@@ -1,7 +1,7 @@
 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)
@@ -10,8 +10,8 @@ Index: doc/Makefile.am
  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

Reply via email to