bird-1.5.0.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  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. }
  20. src_configure() {
  21. econf \
  22. --enable-client \
  23. --disable-ipv6 \
  24. --localstatedir="${EPREFIX}/var" \
  25. $(use_enable debug)
  26. if use ipv6; then
  27. cd ipv6
  28. econf \
  29. --enable-client \
  30. --enable-ipv6 \
  31. --localstatedir="${EPREFIX}/var" \
  32. $(use_enable debug)
  33. fi
  34. }
  35. src_compile() {
  36. emake
  37. if use ipv6; then
  38. cd ipv6
  39. emake
  40. fi
  41. }
  42. src_install() {
  43. if use ipv6; then
  44. newbin ipv6/birdc birdc6
  45. newsbin ipv6/bird bird6
  46. newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
  47. fi
  48. dobin birdc
  49. dosbin bird
  50. newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
  51. dodoc doc/bird.conf.example
  52. }