radvd-2.15-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit systemd user eutils readme.gentoo-r1
  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. }
  26. src_configure() {
  27. econf --with-pidfile=/run/radvd/radvd.pid \
  28. --disable-silent-rules \
  29. --with-systemdsystemunitdir=no \
  30. $(use_with test check)
  31. }
  32. src_install() {
  33. default
  34. dohtml INTRO.html
  35. newinitd "${FILESDIR}"/${PN}-2.15.init ${PN}
  36. newconfd "${FILESDIR}"/${PN}.conf ${PN}
  37. systemd_dounit "${FILESDIR}"/${PN}.service
  38. systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
  39. if use kernel_FreeBSD ; then
  40. sed -i -e \
  41. 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
  42. "${D}"/etc/init.d/${PN} || die
  43. fi
  44. readme.gentoo_create_doc
  45. }
  46. DISABLE_AUTOFORMATTING=1
  47. DOC_CONTENTS="Please create a configuration file ${ROOT}etc/radvd.conf.
  48. See ${ROOT}usr/share/doc/${PF} for an example.
  49. grsecurity users should allow a specific group to read /proc
  50. and add the radvd user to that group, otherwise radvd may
  51. segfault on startup."