radvd-2.14.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit systemd user eutils readme.gentoo
  5. DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
  6. HOMEPAGE="http://v6web.litech.org/radvd/"
  7. SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="amd64 arm ~arm64 hppa ppc sparc x86 ~x86-fbsd"
  11. IUSE="kernel_FreeBSD selinux test"
  12. CDEPEND="dev-libs/libdaemon"
  13. DEPEND="${CDEPEND}
  14. sys-devel/bison
  15. sys-devel/flex
  16. virtual/pkgconfig
  17. test? ( dev-libs/check )"
  18. RDEPEND="${CDEPEND}
  19. selinux? ( sec-policy/selinux-radvd )
  20. "
  21. DOCS=( CHANGES README TODO radvd.conf.example )
  22. pkg_setup() {
  23. enewgroup radvd
  24. enewuser radvd -1 -1 /dev/null radvd
  25. # force ownership of radvd user and group (bug #19647)
  26. [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
  27. }
  28. src_configure() {
  29. econf --with-pidfile=/var/run/radvd/radvd.pid \
  30. --disable-silent-rules \
  31. $(use_with test check)
  32. }
  33. src_install() {
  34. default
  35. dohtml INTRO.html
  36. newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
  37. newconfd "${FILESDIR}"/${PN}.conf ${PN}
  38. systemd_dounit "${FILESDIR}"/${PN}.service
  39. systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
  40. if use kernel_FreeBSD ; then
  41. sed -i -e \
  42. 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
  43. "${D}"/etc/init.d/${PN} || die
  44. fi
  45. readme.gentoo_create_doc
  46. }
  47. DISABLE_AUTOFORMATTING=1
  48. DOC_CONTENTS="Please create a configuration file ${ROOT}etc/radvd.conf.
  49. See ${ROOT}usr/share/doc/${PF} for an example.
  50. grsecurity users should allow a specific group to read /proc
  51. and add the radvd user to that group, otherwise radvd may
  52. segfault on startup."