Lines 1-12
Link Here
|
1 |
# Copyright 1999-2009 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-wireless/kismet/kismet-2008.05.1.ebuild,v 1.5 2009/08/09 15:09:23 ssuominen Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
inherit toolchain-funcs linux-info eutils |
5 |
EAPI="2" |
|
|
6 |
|
7 |
inherit eutils |
6 |
|
8 |
|
7 |
MY_P=${P/\./-} |
9 |
MY_P=${P/\./-} |
8 |
MY_P=${MY_P/./-R} |
10 |
MY_P=${MY_P/./-R} |
9 |
S=${WORKDIR}/${MY_P} |
|
|
10 |
|
11 |
|
11 |
DESCRIPTION="IEEE 802.11 wireless LAN sniffer" |
12 |
DESCRIPTION="IEEE 802.11 wireless LAN sniffer" |
12 |
HOMEPAGE="http://www.kismetwireless.net/" |
13 |
HOMEPAGE="http://www.kismetwireless.net/" |
Lines 14-66
SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.gz"
Link Here
|
14 |
|
15 |
|
15 |
LICENSE="GPL-2" |
16 |
LICENSE="GPL-2" |
16 |
SLOT="0" |
17 |
SLOT="0" |
17 |
KEYWORDS="amd64 ppc x86" |
18 |
KEYWORDS="~amd64 ~ppc ~x86" |
18 |
IUSE="dbus ncurses" |
19 |
|
19 |
|
20 |
KISMET_PLUGINS="autowep ptw spectools" |
20 |
DEPEND="${RDEPEND}" |
21 |
IUSE="+client kernel_linux +pcre +pcap +suid ${KISMET_PLUGINS}" |
21 |
RDEPEND="net-wireless/wireless-tools |
22 |
|
22 |
net-libs/libpcap |
23 |
RDEPEND="pcap? ( net-libs/libpcap ) |
23 |
ncurses? ( sys-libs/ncurses ) |
24 |
client? ( sys-libs/ncurses ) |
24 |
dbus? ( sys-apps/dbus )" |
25 |
kernel_linux? ( |
25 |
|
26 |
dev-libs/libnl |
26 |
src_unpack() { |
27 |
sys-libs/libcap |
27 |
unpack ${A} |
28 |
) |
28 |
cd "${S}" |
29 |
pcre? ( dev-libs/libpcre ) |
|
|
30 |
ptw? ( dev-libs/openssl )" |
31 |
DEPEND="${RDEPEND} |
32 |
dev-util/pkgconfig" |
33 |
|
34 |
S="${WORKDIR}/${MY_P}" |
35 |
|
36 |
src_prepare() { |
37 |
sed -i -e 's:# *logprefix=.*:logprefix=/tmp:' conf/kismet.conf.in \ |
38 |
|| die "failed to change logprefix" |
39 |
} |
29 |
|
40 |
|
30 |
sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \ |
41 |
src_configure() { |
31 |
conf/kismet.conf.in |
42 |
econf --with-suidgroup=kismet \ |
|
|
43 |
$(use_enable client) \ |
44 |
$(use_enable kernel_linux linuxwext) \ |
45 |
$(use_enable pcre) \ |
46 |
$(use_enable pcap) |
47 |
} |
32 |
|
48 |
|
33 |
# Don't strip and set correct mangrp |
49 |
src_compile() { |
34 |
sed -i -e 's| -s||g' \ |
50 |
emake || die "emake failed" |
35 |
-e 's|@mangrp@|root|g' Makefile.in |
|
|
36 |
|
51 |
|
37 |
epatch "${FILESDIR}"/gcc-4.3.patch |
52 |
for plugin in ${KISMET_PLUGINS}; do |
38 |
epatch "${FILESDIR}"/${P}-glibc-2.10.patch |
53 |
if use ${plugin}; then |
|
|
54 |
emake -C plugin-${plugin} KIS_SRC_DIR="${S}" \ |
55 |
|| die "emake in plugin-${plugin} failed" |
56 |
fi |
57 |
done |
39 |
} |
58 |
} |
40 |
|
59 |
|
41 |
src_compile() { |
60 |
src_install() { |
42 |
# the configure script only honors '--disable-foo' |
61 |
emake DESTDIR="${D}" commoninstall || die "emake install failed" |
43 |
local myconf="--disable-gpsmap" |
|
|
44 |
|
62 |
|
45 |
if ! use ncurses; then |
63 |
for plugin in ${KISMET_PLUGINS}; do |
46 |
myconf="${myconf} --disable-curses --disable-panel" |
64 |
if use ${plugin}; then |
47 |
fi |
65 |
emake -C plugin-${plugin} KIS_SRC_DIR="${S}" DESTDIR="${D}" install \ |
48 |
if ! use dbus; then |
66 |
|| die "emake install in plugin-${plugin} failed" |
49 |
myconf="${myconf} --disable-dbus" |
67 |
fi |
50 |
fi |
68 |
done |
51 |
|
69 |
|
52 |
econf ${myconf} \ |
70 |
dodoc README docs/{DEVEL.client,README.newcore} || die |
53 |
--with-linuxheaders="${KV_DIR}" || die "econf failed" |
|
|
54 |
|
71 |
|
55 |
emake dep || die "emake dep failed" |
72 |
insinto /etc |
56 |
emake || die "emake failed" |
73 |
doins conf/kismet{,_drone}.conf || die |
57 |
} |
|
|
58 |
|
74 |
|
59 |
src_install () { |
75 |
newinitd "${FILESDIR}"/${PN}.initd kismet || die |
60 |
emake DESTDIR="${D}" install || die "emake install failed" |
76 |
newconfd "${FILESDIR}"/${PN}.confd kismet || die |
61 |
|
77 |
|
62 |
dodoc CHANGELOG README TODO docs/* |
78 |
if use suid; then |
|
|
79 |
dobin kismet_capture || die |
80 |
fperms 4550 /usr/bin/kismet_capture || die |
81 |
fi |
82 |
} |
63 |
|
83 |
|
64 |
newinitd "${FILESDIR}"/${PN}.initd kismet |
84 |
pkg_preinst() { |
65 |
newconfd "${FILESDIR}"/${PN}.confd kismet |
85 |
if use suid; then |
|
|
86 |
enewgroup kismet |
87 |
fowners root:kismet /usr/bin/kismet_capture |
88 |
elog "Kismet has been installed with a setuid-root helper binary" |
89 |
elog "to enable minimal-root operation. Users need to be part of" |
90 |
elog "the 'kismet' group to perform captures from physical devices." |
91 |
fi |
66 |
} |
92 |
} |