ipvsadm-1.24.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit linux-info toolchain-funcs
  4. DESCRIPTION="utility to administer the IP virtual server services offered by the Linux kernel"
  5. HOMEPAGE="http://linuxvirtualserver.org/"
  6. SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.5/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="amd64 ia64 ~ppc64 s390 sparc x86"
  10. IUSE=""
  11. RDEPEND=">=sys-libs/ncurses-5.2"
  12. DEPEND="${RDEPEND}"
  13. pkg_setup() {
  14. if kernel_is 2 4; then
  15. eerror "${P} supports only 2.6 kernels, please try ${PN}-1.21 for 2.4 kernels"
  16. die "wrong kernel version"
  17. fi
  18. }
  19. src_compile() {
  20. emake \
  21. -j1 \
  22. INCLUDE="-I${KV_DIR}/include -I.. -I." \
  23. CFLAGS="${CFLAGS}" \
  24. CC="$(tc-getCC)" \
  25. || die "error compiling source"
  26. }
  27. src_install() {
  28. into /
  29. dosbin ipvsadm ipvsadm-save ipvsadm-restore || die
  30. doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 || die
  31. newinitd "${FILESDIR}"/ipvsadm-init ipvsadm
  32. keepdir /var/lib/ipvsadm
  33. dolib.a libipvs/libipvs.a || die
  34. insinto /usr/include/ipvs
  35. newins libipvs/libipvs.h ipvs.h || die
  36. }
  37. pkg_postinst() {
  38. einfo "You will need a kernel that has ipvs patches to use LVS."
  39. einfo "This version is specifically for 2.6 kernels."
  40. }