*/*: [QA] Use consistent function definition formatting
[gentoo.git] / net-misc / libteam / libteam-1.30.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools linux-info
7
8 if [[ ${PV} == *9999 ]] ; then
9         EGIT_REPO_URI="https://github.com/pirko/${PN}.git"
10         inherit git-r3
11 else
12         SRC_URI="https://github.com/jpirko/libteam/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13         KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
14 fi
15
16 DESCRIPTION="Library and tools set for controlling team network device"
17 HOMEPAGE="http://libteam.org"
18
19 LICENSE="LGPL-2.1+"
20 SLOT="0"
21 IUSE="dbus debug examples static-libs +syslog zmq"
22
23 DEPEND=">=dev-libs/jansson-2.4
24         dev-libs/libdaemon
25         >=dev-libs/libnl-3.2.19[utils]
26         dbus? ( sys-apps/dbus )
27         zmq? ( >=net-libs/zeromq-3.2.0 )
28         "
29
30 RDEPEND="${DEPEND}
31         syslog? ( virtual/logger )"
32
33 CONFIG_CHECK="~NET_TEAM ~NET_TEAM_MODE_ROUNDROBIN ~NET_TEAM_MODE_ACTIVEBACKUP ~NET_TEAM_MODE_BROADCAST ~NET_TEAM_MODE_RANDOM ~NET_TEAM_MODE_LOADBALANCE"
34 ERROR_NET_TEAM="NET_TEAM is not enabled in this kernel!
35 Only >=3.3.0 kernel version support in team mode"
36
37 DOCS=( README )
38
39 src_prepare() {
40         default
41         eautoreconf
42 }
43
44 src_configure() {
45         econf \
46                 $(use_enable debug) \
47                 $(use_enable syslog logging) \
48                 $(use_enable dbus) \
49                 $(use_enable zmq)
50 }
51
52 src_install() {
53         default
54
55         insinto /etc/dbus-1/system.d
56         doins teamd/dbus/teamd.conf
57
58         if use examples; then
59                 docinto examples
60                 dodoc teamd/example_configs/*
61         fi
62 }