keepalived-1.2.2-r4.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools base
  5. DESCRIPTION="A strong & robust keepalive facility to the Linux Virtual Server project"
  6. HOMEPAGE="http://www.keepalived.org/"
  7. DEBIAN_PATCH=3
  8. DEBIAN_A="${P/-/_}-${DEBIAN_PATCH}.diff.gz"
  9. SRC_URI="http://www.keepalived.org/software/${P}.tar.gz
  10. mirror://debian/pool/main/${PN:0:1}/${PN}/${DEBIAN_A}"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 s390 sparc x86"
  14. IUSE="debug ipv6"
  15. RDEPEND="dev-libs/popt
  16. sys-apps/iproute2
  17. dev-libs/libnl:1.1
  18. dev-libs/openssl"
  19. DEPEND="${RDEPEND}
  20. >=sys-kernel/linux-headers-2.6.30"
  21. PATCHES=(
  22. "${FILESDIR}"/${PN}-1.1.20-do-not-need-kernel-sources.patch
  23. "${FILESDIR}"/${PN}-1.2.2-bind-afunspec.patch
  24. "${FILESDIR}"/${PN}-1.2.2-fix-ipv4-addr-compare.patch
  25. "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-backup-daemon.patch
  26. )
  27. DOCS=( README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO doc/keepalived.conf.SYNOPSIS )
  28. src_prepare() {
  29. base_src_prepare
  30. EPATCH_OPTS="-p1" epatch "${DISTDIR}"/"${DEBIAN_A}"
  31. epatch "${S}"/debian/patches/*patch
  32. use ipv6 && epatch "${FILESDIR}"/${PN}-1.2.2-libipvs-fix-ipv6.patch
  33. eautoreconf
  34. }
  35. src_configure() {
  36. STRIP=/bin/true \
  37. econf \
  38. --enable-vrrp \
  39. $(use_enable debug)
  40. }
  41. src_install() {
  42. default
  43. newinitd "${FILESDIR}"/init-keepalived keepalived
  44. newconfd "${FILESDIR}"/conf-keepalived keepalived
  45. docinto genhash
  46. dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION || die
  47. # This was badly named by upstream, it's more HOWTO than anything else.
  48. newdoc INSTALL INSTALL+HOWTO
  49. # Security risk to bundle SSL certs
  50. rm -f "${ED}"/etc/keepalived/samples/*.pem
  51. # Clean up sysvinit files
  52. rm -rf "${ED}"/etc/sysconfig "${ED}"/etc/rc.d/
  53. }