commit:     abd116166f962eca74b9c40579f809ac69ddf420
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 23:29:05 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 23:31:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abd11616

net-misc/ndisc6: add 1.0.7

Use "/var" for localstatedir to correct the path to "/var/run".
Clean up the init script.

Closes: https://bugs.gentoo.org/343431
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-misc/ndisc6/Manifest            |  1 +
 net-misc/ndisc6/files/rdnssd.rc-2   | 24 ++++++++++++++++++++++++
 net-misc/ndisc6/files/resolvconf-2  |  7 +++++++
 net-misc/ndisc6/ndisc6-1.0.7.ebuild | 36 ++++++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+)

diff --git a/net-misc/ndisc6/Manifest b/net-misc/ndisc6/Manifest
index 68080486b712..af64682c14f8 100644
--- a/net-misc/ndisc6/Manifest
+++ b/net-misc/ndisc6/Manifest
@@ -1 +1,2 @@
 DIST ndisc6-1.0.6.tar.bz2 262008 BLAKE2B 
b451f8a6f74fe0d30546152e9711055cb2d9fd1433a83f0fdcc57eba4f9eaf41705b03fcfcc14666906f90f3a450c2ef6e3d66faca5019106664dd96dd6d70cf
 SHA512 
e9ce26d139c5cdcaac7a507c247ace5ba1d6bc95a92fbdb693788e463183965390a8228133a8bbbf07ba19eeae64c7a12ce13eb031c1a0c0c47b086d42c527ae
+DIST ndisc6-1.0.7.tar.bz2 262144 BLAKE2B 
6eeb4d8b78e189f1c2db26312b67d8a9ed4343fad0c9db08bfc8e7d4514f50b1b11c6ee5f784cc0480979758a0fae840e87b61bbbdf4c372fe58117cb8dfdab4
 SHA512 
cd3da7efc050b9f71a0d41336367c21936b37a2a040b58f01ccd5657a4cbd791b974bcd32e0725b325d9322974b0e721af9a6d9ef4693506e437c29a15d81526

diff --git a/net-misc/ndisc6/files/rdnssd.rc-2 
b/net-misc/ndisc6/files/rdnssd.rc-2
new file mode 100644
index 000000000000..a3a2a45a2d1f
--- /dev/null
+++ b/net-misc/ndisc6/files/rdnssd.rc-2
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+       need localmount
+       before net
+       use logger
+}
+
+command="rdnssd"
+pidfile="/var/run/rdnssd.pid"
+command_args="${RDNSSD_OPTS}"
+command_args_foreground="-f"
+
+start_pre() {
+       checkpath -d -o nobody /var/run/rdnssd
+}
+
+stop_post() {
+       if command -v resolvconf >/dev/null; then
+               resolvconf -f -d rdnssd
+       fi
+}

diff --git a/net-misc/ndisc6/files/resolvconf-2 
b/net-misc/ndisc6/files/resolvconf-2
new file mode 100644
index 000000000000..79d69c60e7ad
--- /dev/null
+++ b/net-misc/ndisc6/files/resolvconf-2
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if command -v resolvconf >/dev/null; then
+       exec resolvconf -a rdnssd </var/run/rdnssd/resolv.conf
+else
+       exec "$(dirname "$0")"/merge-hook
+fi

diff --git a/net-misc/ndisc6/ndisc6-1.0.7.ebuild 
b/net-misc/ndisc6/ndisc6-1.0.7.ebuild
new file mode 100644
index 000000000000..d0d3a2b1bbd4
--- /dev/null
+++ b/net-misc/ndisc6/ndisc6-1.0.7.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="IPv6 diagnostic tools"
+HOMEPAGE="https://www.remlab.net/ndisc6/";
+SRC_URI="https://www.remlab.net/files/${PN}/${P}.tar.bz2";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86 ~x64-macos"
+IUSE="debug"
+
+BDEPEND="dev-lang/perl
+       sys-devel/gettext"
+
+src_configure() {
+       local args=(
+               --localstatedir="${EPREFIX}"/var
+               $(use_enable debug assert)
+       )
+       econf "${args[@]}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+       rm -r "${ED}/var" || die
+
+       newinitd "${FILESDIR}"/rdnssd.rc-2 rdnssd
+       newconfd "${FILESDIR}"/rdnssd.conf rdnssd
+
+       exeinto /etc/rdnssd
+       newexe "${FILESDIR}"/resolvconf-2 resolvconf
+       dodoc AUTHORS ChangeLog NEWS README
+}

Reply via email to