Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ipvsadm/
Date: Sat, 01 Jan 2022 10:48:22
Message-Id: 1641034083.b86927a6cece78844f9612ef55f874d2ac00edf5.ulm@gentoo
1 commit: b86927a6cece78844f9612ef55f874d2ac00edf5
2 Author: Marco Scardovi <marco <AT> scardovi <DOT> com>
3 AuthorDate: Tue Dec 14 22:10:33 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 1 10:48:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b86927a6
7
8 sys-cluster/ipvsadm: bump to EAPI 8 and drop epatch
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 sys-cluster/ipvsadm/ipvsadm-1.31-r1.ebuild | 76 ++++++++++++++++++++++++++++++
15 1 file changed, 76 insertions(+)
16
17 diff --git a/sys-cluster/ipvsadm/ipvsadm-1.31-r1.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.31-r1.ebuild
18 new file mode 100644
19 index 000000000000..22b2dc5d4897
20 --- /dev/null
21 +++ b/sys-cluster/ipvsadm/ipvsadm-1.31-r1.ebuild
22 @@ -0,0 +1,76 @@
23 +# Copyright 1999-2021 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=8
27 +
28 +inherit linux-info toolchain-funcs
29 +
30 +DESCRIPTION="utility to administer the IP virtual server services"
31 +HOMEPAGE="http://linuxvirtualserver.org/"
32 +SRC_URI="https://kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-${PV}.tar.xz"
33 +
34 +LICENSE="GPL-2"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
37 +IUSE="static-libs"
38 +
39 +RDEPEND="
40 + >=sys-libs/ncurses-5.2:=
41 + dev-libs/libnl:=
42 + >=dev-libs/popt-1.16
43 +"
44 +
45 +BDEPEND="
46 + ${RDEPEND}
47 + virtual/pkgconfig
48 +"
49 +
50 +PATCHES=( "${FILESDIR}/${PN}"-1.27-buildsystem.patch )
51 +
52 +pkg_pretend() {
53 + if kernel_is 2 4; then
54 + eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels"
55 + die "wrong kernel version"
56 + fi
57 +}
58 +
59 +src_prepare() {
60 + default
61 + use static-libs && export STATIC=1
62 +}
63 +
64 +src_compile() {
65 + local libnl_include
66 + if has_version ">=dev-libs/libnl-3.0"; then
67 + libnl_include=$($(tc-getPKG_CONFIG) --cflags libnl-3.0)
68 + else
69 + libnl_include=""
70 + fi
71 + emake -e \
72 + INCLUDE="-I.. -I. ${libnl_include}" \
73 + CC="$(tc-getCC)" \
74 + HAVE_NL=1 \
75 + STATIC="${STATIC}" \
76 + POPT_LIB="$($(tc-getPKG_CONFIG) --libs popt)"
77 +}
78 +
79 +src_install() {
80 + into /
81 + dosbin ipvsadm ipvsadm-save ipvsadm-restore
82 +
83 + into /usr
84 + doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8
85 +
86 + newinitd "${FILESDIR}"/ipvsadm-init ipvsadm
87 + keepdir /var/lib/ipvsadm
88 +
89 + use static-libs && dolib.a libipvs/libipvs.a
90 + dolib.so libipvs/libipvs.so
91 +
92 + insinto /usr/include/ipvs
93 + newins libipvs/libipvs.h ipvs.h
94 +}
95 +
96 +pkg_postinst() {
97 + einfo "You will need a kernel that has ipvs patches to use LVS."
98 +}