1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit systemd user eutils
9 DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
10 HOMEPAGE="http://v6web.litech.org/radvd/"
11 SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
15 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
16 IUSE="kernel_FreeBSD selinux"
18 CDEPEND="dev-libs/libdaemon"
24 selinux? ( sec-policy/selinux-radvd )
27 DOCS=( CHANGES-1 README TODO radvd.conf.example )
31 enewuser radvd -1 -1 /dev/null radvd
33 # force ownership of radvd user and group (bug #19647)
34 [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
38 econf --with-pidfile=/var/run/radvd/radvd.pid \
39 --disable-silent-rules
47 newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
48 newconfd "${FILESDIR}"/${PN}.conf ${PN}
50 systemd_dounit "${FILESDIR}"/${PN}.service
52 if use kernel_FreeBSD ; then
54 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
55 "${D}"/etc/init.d/${PN} || die
61 elog "Please create a configuratoion ${ROOT}etc/radvd.conf."
62 elog "See ${ROOT}usr/share/doc/${PF} for an example."
64 elog "grsecurity users should allow a specific group to read /proc"
65 elog "and add the radvd user to that group, otherwise radvd may"
66 elog "segfault on startup."