summaryrefslogtreecommitdiff
blob: b5b119189bc06677932c738b842b61eb07c7cc56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/libteam/libteam-0_rc8448186.ebuild,v 1.1 2012/10/22 12:25:33 pinkbyte Exp $

EAPI=4

AUTOTOOLS_AUTORECONF="yes"
AUTOTOOLS_IN_SOURCE_BUILD=1

inherit  autotools-utils linux-info versionator

MY_PV="$(get_version_component_range 2-)"
MY_PV="${MY_PV/rc/}"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="Library and tools set for controlling team network device"
HOMEPAGE="https://fedorahosted.org/libteam/"
SRC_URI="http://rion-overlay.googlecode.com/files/jpirko-${MY_P}.tar.gz -> ${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug examples +syslog"

DEPEND="dev-libs/jansson
	dev-libs/libdaemon
	dev-libs/libnl:3[utils]
	sys-apps/dbus
	"
RDEPEND="${DEPEND}
	syslog? ( virtual/logger )"

CONFIG_CHECK="~NET_TEAM ~NET_TEAM_MODE_ROUNDROBIN ~NET_TEAM_MODE_ACTIVEBACKUP"
ERROR_NET_TEAM="NET_TEAM is not enabled in this kernel!
Only >=3.3.0 kernel version support in team mode"

S="${WORKDIR}/jpirko-${MY_P}"

DOCS=( HOWTO.BASICS README )

src_prepare() {
	# avoid using -Werror in CFLAGS
	sed -i -e '/^CFLAGS/s/-Werror//' configure.ac || die 'sed on CFLAGS failed'

	autotools-utils_src_prepare
}

src_configure() {
	local myeconfargs=(
		$(use_enable debug)
		$(use_enable syslog logging)
	)
	autotools-utils_src_configure
}

src_install() {
	autotools-utils_src_install

	insinto /etc/dbus-1/system.d/
	doins teamd/dbus/teamd.conf

	if use examples; then
		insinto /etc/"${PN}"/example
		doins teamd/example_configs/*
	fi
}