radvd-2.16.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit systemd user eutils readme.gentoo-r1 tmpfiles
  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. insinto /usr/share/doc/${PF}/html
  35. doins INTRO.html
  36. newinitd "${FILESDIR}"/${PN}-2.15.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. pkg_postinst() {
  48. tmpfiles_process ${PN}.conf
  49. }
  50. DISABLE_AUTOFORMATTING=1
  51. DOC_CONTENTS="Please create a configuration file ${ROOT}etc/radvd.conf.
  52. See ${ROOT}usr/share/doc/${PF} for an example.
  53. grsecurity users should allow a specific group to read /proc
  54. and add the radvd user to that group, otherwise radvd may
  55. segfault on startup."