summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/radvd')
-rw-r--r--net-misc/radvd/Manifest4
-rw-r--r--net-misc/radvd/files/radvd-1.9.1.init71
-rw-r--r--net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch87
-rw-r--r--net-misc/radvd/files/radvd.conf11
-rw-r--r--net-misc/radvd/files/radvd.service15
-rw-r--r--net-misc/radvd/files/radvd.tmpfilesd1
-rw-r--r--net-misc/radvd/metadata.xml12
-rw-r--r--net-misc/radvd/radvd-1.15.ebuild67
-rw-r--r--net-misc/radvd/radvd-1.9.8.ebuild64
-rw-r--r--net-misc/radvd/radvd-2.10.ebuild68
-rw-r--r--net-misc/radvd/radvd-2.11-r1.ebuild73
-rw-r--r--net-misc/radvd/radvd-2.11.ebuild69
12 files changed, 542 insertions, 0 deletions
diff --git a/net-misc/radvd/Manifest b/net-misc/radvd/Manifest
new file mode 100644
index 000000000000..55d6795be93d
--- /dev/null
+++ b/net-misc/radvd/Manifest
@@ -0,0 +1,4 @@
+DIST radvd-1.15.tar.gz 185528 SHA256 ba2e16bf0b2ac0030aacb0927304603f7ebbd317fdf30a24ee6f9ba06428391d SHA512 39d7ad22b25b36ab8079e9a48f50f69ea2be8a02d2e76638940c5eb769bf9291f28d275d7799296009e3c61bcb106c276bc5c60c9090951ea9f2dc7e00945ba7 WHIRLPOOL 3620518e71a243335cf8e064b4f3c45d80ec2e2d94748caa8ccaf3e0f317ffb3244ae719f07008abd65763f3ebc0110e2d5d5f570f1569b8377f70e0a9dfecc4
+DIST radvd-1.9.8.tar.gz 176288 SHA256 645ccf1c9b16e769ff4179813712e580e2c8786d64a888d8afa1e296c057c1c1 SHA512 25ffa2fe1289ee826432ade3846aa5008e34ff9f0cbe954bf44ebae22198de59b40b7b4a70d19c74117b3280a7ca6a4bf740536f4a08e0bf169e760748548971 WHIRLPOOL 228182cb6fdc6065a728f679ee6d93286c48f186b209b6ff8d553f06317d0e799687c5abf0179cda5c42d2ca72ca32bdacbc31e0a14a06d18316a6538eb09017
+DIST radvd-2.10.tar.gz 202426 SHA256 b41867c5b0375f786bebbd3fc88776d41927aa392eeba954e4b88f8ec7e8f13e SHA512 cfc34ad414bd07e22519982f8c3fa75cb27eab54131d0af09d6dd5fbb69da3de26fda776593e1a4e2735b63fc7cc2224663665854895d8be459f43ba4012fa26 WHIRLPOOL 5689d137313e75e30f370637bc92f4e242f2a4e2675b0ee34f1824a66e7efcf4ad683e121375623b62f015dd59a664511f2dbcff229c70a9d55c083dc7fef98f
+DIST radvd-2.11.tar.gz 202596 SHA256 80ad60b15689e9591a5af393a57a1d93304deeff2e46482f0fd98046c00622f8 SHA512 35fc641b81cc76de677c8e55a61c8b28d9167d8f40a3fa7adf2a254293ca2d7856ca2c8f6d3bdba391bf873345d3019c0f572ee166eaba011ae874b176c85d4b WHIRLPOOL 058ecf265881963e44267945349e56f1b5bb402b8e4605bd852a8e3ced00419e0028eee70028819433bbc7d596f938d94fef1145ea615c66a975feb9fe4aa56c
diff --git a/net-misc/radvd/files/radvd-1.9.1.init b/net-misc/radvd/files/radvd-1.9.1.init
new file mode 100644
index 000000000000..779233326aa9
--- /dev/null
+++ b/net-misc/radvd/files/radvd-1.9.1.init
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/var/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f "${CONFIGFILE}" ]; then
+ eerror "Configuration file ${CONFIGFILE} not found"
+ return 1
+ fi
+
+ if ! /usr/sbin/radvd -c -C "${CONFIGFILE}" ; then
+ eerror "Configuration file ${CONFIGFILE} failed test"
+ return 1
+ fi
+
+ checkpath -d -o radvd:radvd ${PIDFILE%/*}
+}
+
+start() {
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ checkconfig || return 1
+
+ ebegin "Starting IPv6 Router Advertisement Daemon"
+ start-stop-daemon --start --exec /usr/sbin/radvd \
+ --pidfile "${PIDFILE}" \
+ -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping IPv6 Router Advertisement Daemon"
+ start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Disabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null
+ eend $?
+ fi
+}
+
+reload() {
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ checkconfig || return 1
+
+ ebegin "Reloading IPv6 Router Advertisement Daemon"
+ start-stop-daemon --signal HUP \
+ --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch
new file mode 100644
index 000000000000..c44f28437be4
--- /dev/null
+++ b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch
@@ -0,0 +1,87 @@
+From 1d8973e13d89802eee0b648451e2b97ac65cf9e0 Mon Sep 17 00:00:00 2001
+From: Reuben Hawkins <reubenhwk@gmail.com>
+Date: Sat, 16 May 2015 09:27:38 -0700
+Subject: [PATCH] device-linux.c: IEEE 802.15.4 musl libc fix
+
+The ARPHRD_IEEE802154 macro's definition and name have been recently
+moved around from kernel header to glibc headers. Include linux/if_arp.h
+if available and then use either ARPHRD_IEEE802154_MONITOR or ARPHRD_IEEE802154_PHY,
+whichever comes first.
+---
+ configure.ac | 1 +
+ device-linux.c | 8 ++++++++
+ includes.h | 6 ++++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0c1efd6..4bd4c9d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -156,6 +156,7 @@ AC_HEADER_STDC
+ AC_CHECK_HEADERS( \
+ getopt.h \
+ ifaddrs.h \
++ linux/if_arp.h \
+ machine/limits.h \
+ machine/param.h \
+ net/if_arp.h \
+diff --git a/device-linux.c b/device-linux.c
+index fa7d978..de83f2e 100644
+--- a/device-linux.c
++++ b/device-linux.c
+@@ -79,10 +79,12 @@ int update_device_info(int sock, struct Interface *iface)
+ iface->sllao.if_maxmtu = -1;
+ break;
+ #endif /* ARPHDR_ARCNET */
++#ifdef ARPHRD_IEEE802154
+ case ARPHRD_IEEE802154:
+ iface->sllao.if_hwaddr_len = 64;
+ iface->sllao.if_prefix_len = 64;
+ break;
++#endif
+ default:
+ iface->sllao.if_hwaddr_len = -1;
+ iface->sllao.if_prefix_len = -1;
+@@ -371,9 +373,15 @@ static char const *hwstr(unsigned short sa_family)
+ case ARPHRD_IEEE802154:
+ rc = "ARPHRD_IEEE802154";
+ break;
++#if ARPHRD_IEEE802154_MONITOR
++ case ARPHRD_IEEE802154_MONITOR:
++ rc = "ARPHRD_IEEE802154_MONITOR";
++ break;
++#elif ARPHRD_IEEE802154_PHY
+ case ARPHRD_IEEE802154_PHY:
+ rc = "ARPHRD_IEEE802154_PHY";
+ break;
++#endif
+ case ARPHRD_VOID:
+ rc = "ARPHRD_VOID";
+ break;
+diff --git a/includes.h b/includes.h
+index 39a36d2..d2449c4 100644
+--- a/includes.h
++++ b/includes.h
+@@ -81,9 +81,11 @@
+ #ifdef HAVE_NET_IF_DL_H
+ #include <net/if_dl.h>
+ #endif
++
+ #ifdef HAVE_NET_IF_TYPES_H
+ #include <net/if_types.h>
+ #endif
++
+ #if defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER)
+ #include <net/if_arp.h>
+ #endif /* defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER) */
+@@ -100,3 +102,7 @@
+ #include <ifaddrs.h>
+ #endif
+
++#ifdef HAVE_LINUX_IF_ARP_H
++#include <linux/if_arp.h>
++#endif
++
+--
+2.3.6
+
diff --git a/net-misc/radvd/files/radvd.conf b/net-misc/radvd/files/radvd.conf
new file mode 100644
index 000000000000..d1a95b8dea20
--- /dev/null
+++ b/net-misc/radvd/files/radvd.conf
@@ -0,0 +1,11 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Extra options to pass to radvd
+OPTIONS=""
+
+# Set this to "no" to tell the init script NOT to set up IPv6 forwarding
+# using /proc/sys/net/ipv6/conf/all/forwarding
+# Only change this if you know what you're doing!
+FORWARD="yes"
diff --git a/net-misc/radvd/files/radvd.service b/net-misc/radvd/files/radvd.service
new file mode 100644
index 000000000000..d9095f625a9c
--- /dev/null
+++ b/net-misc/radvd/files/radvd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Router advertisement daemon for IPv6
+Documentation=man:radvd(8)
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0
+ExecReload=/usr/sbin/radvd --configtest ; \
+ /bin/kill -HUP $MAINPID
+CPUSchedulingPolicy=idle
+PIDFile=/run/radvd/radvd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/radvd/files/radvd.tmpfilesd b/net-misc/radvd/files/radvd.tmpfilesd
new file mode 100644
index 000000000000..26f203d1aaa7
--- /dev/null
+++ b/net-misc/radvd/files/radvd.tmpfilesd
@@ -0,0 +1 @@
+d /run/radvd 0755 radvd radvd
diff --git a/net-misc/radvd/metadata.xml b/net-misc/radvd/metadata.xml
new file mode 100644
index 000000000000..74f40b3dcdab
--- /dev/null
+++ b/net-misc/radvd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/radvd/radvd-1.15.ebuild b/net-misc/radvd/radvd-1.15.ebuild
new file mode 100644
index 000000000000..371d27df623d
--- /dev/null
+++ b/net-misc/radvd/radvd-1.15.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+
+DOCS=( CHANGES-1 README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please create a configuratoion ${ROOT}etc/radvd.conf."
+ elog "See ${ROOT}usr/share/doc/${PF} for an example."
+ einfo
+ elog "grsecurity users should allow a specific group to read /proc"
+ elog "and add the radvd user to that group, otherwise radvd may"
+ elog "segfault on startup."
+}
diff --git a/net-misc/radvd/radvd-1.9.8.ebuild b/net-misc/radvd/radvd-1.9.8.ebuild
new file mode 100644
index 000000000000..2012bc2c67d8
--- /dev/null
+++ b/net-misc/radvd/radvd-1.9.8.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc sparc x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please create a configuratoion ${ROOT}etc/radvd.conf."
+ elog "See ${ROOT}usr/share/doc/${PF} for an example."
+ einfo
+ elog "grsecurity users should allow a specific group to read /proc"
+ elog "and add the radvd user to that group, otherwise radvd may"
+ elog "segfault on startup."
+}
diff --git a/net-misc/radvd/radvd-2.10.ebuild b/net-misc/radvd/radvd-2.10.ebuild
new file mode 100644
index 000000000000..5fd09726c641
--- /dev/null
+++ b/net-misc/radvd/radvd-2.10.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils readme.gentoo
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc sparc x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ dev-libs/check
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuratoion ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."
diff --git a/net-misc/radvd/radvd-2.11-r1.ebuild b/net-misc/radvd/radvd-2.11-r1.ebuild
new file mode 100644
index 000000000000..d7e194998fd8
--- /dev/null
+++ b/net-misc/radvd/radvd-2.11-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils readme.gentoo
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux test"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.10-musl-libc-fix.patch
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules \
+ $(use_with test check)
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuratoion ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."
diff --git a/net-misc/radvd/radvd-2.11.ebuild b/net-misc/radvd/radvd-2.11.ebuild
new file mode 100644
index 000000000000..9da97dbf3ada
--- /dev/null
+++ b/net-misc/radvd/radvd-2.11.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils readme.gentoo
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux test"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules \
+ $(use_with test check)
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuratoion ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."