summaryrefslogtreecommitdiff
path: root/net-wireless/dedected/dedected-9999.ebuild
blob: 506171a82457594adef940a2163c86f495e8551f (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit toolchain-funcs linux-info linux-mod eutils subversion

DESCRIPTION="DECT Sniffer"
HOMEPAGE="https://dedected.org"
SRC_URI=""
ESVN_REPO_URI="https://dedected.org/svn/trunk/com-on-air_cs-linux/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

DEPEND=""
RDEPEND=""

BUILD_TARGETS="default"
BUILD_TARGET_ARCH="${ARCH}"
MODULE_NAMES="com_on_air_cs(misc:${S})"

pkg_config() {
	linux-mod_pkg_setup
	BUILD_PARAMS="KDIR=${KV_DIR}"
}

pkg_preinst() {
	enewgroup dect
}
src_compile() {
#	KDIR="${KV_DIR}" emake || die "emake failed"
	linux-mod_src_compile
	KDIR="${KV_DIR}" emake -C tools || die "emake tools failed"
	KDIR="${KV_DIR}" emake -C tools/dectshark || die "emake dectshark failed"

}

src_install () {
#	emake DESTDIR="${D}" install || die "emake install failed"
	linux-mod_src_install
	#we could add a group and when we add udev rules we may drop this stuff in bin instead
	dosbin tools/coa_syncsniff tools/dect_cli tools/dump_dip tools/dump_eeprom
	dosbin tools/pcap2cchan tools/pcapstein tools/dectshark/dectshark
	insinto /etc/udev/rules.d/
	doins "${FILESDIR}"/99-dect.rules
	exeinto /lib/udev/
	doexe "${FILESDIR}"/load-dect.sh
}

pkg_postinst() {
	linux-mod_pkg_postinst
	elog "If you want to sniff dect as a user add yourself to the dect group"
}