bird-1.6.2.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6"
  5. HOMEPAGE="http://bird.network.cz"
  6. SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="~amd64 ~x86"
  10. IUSE="debug ipv6"
  11. RDEPEND="sys-libs/ncurses
  12. sys-libs/readline"
  13. DEPEND="sys-devel/flex
  14. sys-devel/bison
  15. sys-devel/m4"
  16. src_prepare() {
  17. mkdir ipv6
  18. tar c --exclude ipv6 . | tar x -C ipv6
  19. eapply_user
  20. }
  21. src_configure() {
  22. econf \
  23. --enable-client \
  24. --disable-ipv6 \
  25. --localstatedir="${EPREFIX}/var" \
  26. $(use_enable debug)
  27. if use ipv6; then
  28. cd ipv6
  29. econf \
  30. --enable-client \
  31. --enable-ipv6 \
  32. --localstatedir="${EPREFIX}/var" \
  33. $(use_enable debug)
  34. fi
  35. }
  36. src_compile() {
  37. emake
  38. if use ipv6; then
  39. cd ipv6
  40. emake
  41. fi
  42. }
  43. src_install() {
  44. if use ipv6; then
  45. newbin ipv6/birdc birdc6
  46. newsbin ipv6/bird bird6
  47. newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
  48. fi
  49. dobin birdc
  50. dosbin bird
  51. newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
  52. dodoc doc/bird.conf.example
  53. }