summaryrefslogtreecommitdiff
blob: c1a1a5eab1bf9496047086003133dc6652ccb770 (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-wireless/crda/crda-1.1.2-r1.ebuild,v 1.1 2011/11/07 21:07:54 gurligebis Exp $

EAPI=4
inherit eutils toolchain-funcs

DESCRIPTION="Central Regulatory Domain Agent for wireless networks."
HOMEPAGE="http://wireless.kernel.org/en/developers/Regulatory"
SRC_URI="http://linuxwireless.org/download/crda/${P}.tar.bz2"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~x86"
IUSE=""

RDEPEND="dev-libs/libgcrypt
	dev-libs/libnl:1.1
	net-wireless/wireless-regdb"
DEPEND="${RDEPEND}
	dev-python/m2crypto"
RDEPEND="${RDEPEND}
	>=sys-fs/udev-152"

src_prepare() {
	epatch "${FILESDIR}"/libnl31-support.diff

	sed -i \
		-e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
		Makefile || die
}

src_compile() {
	emake UDEV_RULE_DIR=/etc/udev/rules.d/ USE_OPENSSL=1 CC="$(tc-getCC)" all_noverify
}

src_test() {
	emake CC="$(tc-getCC)" verify
}

src_install() {
	emake UDEV_RULE_DIR=/etc/udev/rules.d/ USE_OPENSSL=1 DESTDIR="${D}" install
	keepdir /etc/wireless-regdb/pubkeys
}