]>
Commit | Line | Data |
---|---|---|
bd19fd3a ER |
1 | # TODO |
2 | # - Anybody knows, why it will not build, when kernel-headers are installed? | |
7d77e3fc | 3 | # |
496b93f1 | 4 | %define tarver %(echo %{version} | tr _ -) |
ce8d2811 | 5 | Summary: Wireless network sniffer |
3197fdd7 | 6 | Summary(pl.UTF-8): Sniffer sieci bezprzewodowych |
ce8d2811 | 7 | Name: kismet |
d360bfd2 | 8 | Version: 2011_03_R2 |
71f9f83f | 9 | Release: 10 |
ce8d2811 AM |
10 | License: GPL |
11 | Group: Networking/Utilities | |
496b93f1 | 12 | Source0: http://www.kismetwireless.net/code/%{name}-%{tarver}.tar.gz |
d360bfd2 | 13 | # Source0-md5: 8bf077e8111e6dc8c12cadefdf40aadd |
74f46803 | 14 | Patch0: config.patch |
ce8d2811 | 15 | URL: http://www.kismetwireless.net/ |
58c65496 JB |
16 | BuildRequires: autoconf |
17 | BuildRequires: automake | |
412db6e5 | 18 | BuildRequires: bluez-libs-devel |
7d77e3fc | 19 | BuildRequires: gmp-devel |
412db6e5 | 20 | BuildRequires: libcap-devel |
399fadea | 21 | BuildRequires: libnl-devel |
387a2d36 | 22 | BuildRequires: libpcap-devel >= 2:0.9.4-1 |
6870d034 | 23 | BuildRequires: libstdc++-devel |
92c7dc22 | 24 | BuildRequires: ncurses-ext-devel |
412db6e5 | 25 | BuildRequires: openssl-devel |
26 | BuildRequires: pcre-devel | |
9cf4f36b | 27 | BuildRequires: pkgconfig |
496b93f1 | 28 | BuildRequires: sed >= 4.0 |
9128618d | 29 | Suggests: %{name}-server |
58c65496 JB |
30 | # it uses internal structures - so strict deps |
31 | %requires_eq libpcap | |
472ae821 | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ce8d2811 | 33 | |
496b93f1 | 34 | %define plugins plugin-autowep plugin-btscan plugin-ptw plugin-spectools |
89d87381 | 35 | |
ce8d2811 AM |
36 | %description |
37 | Kismet is a 802.11b wireless network sniffer. It is capable of | |
38 | sniffing using almost any wireless card supported in Linux, including | |
39 | Prism2 based cards supported by the Wlan-NG project (Linksys, Dlink, | |
40 | Rangelan, etc), cards which support standard packet capture via | |
41 | libpcap (Cisco), and limited support for cards without RF Monitor | |
42 | support. | |
43 | ||
280f6f5a | 44 | %description -l pl.UTF-8 |
ce8d2811 | 45 | Kismet to sniffer bezprzewodowych sieci 802.11b. Jest zdolny do |
280f6f5a JR |
46 | sniffowania używając prawie dowolnych bezprzewodowych kart sieciowych |
47 | w Linuksie włączając w to karty Prism2 wspierane przez projekt Wlan-NG | |
48 | (Linksys, Dlink, Rangelan, etc), kart które umożliwiają | |
49 | przechwytywanie pakietów poprzez libpcap (Cisco), oraz ograniczone | |
50 | wsparcie dla kart bez obsługi Monitora RF. | |
ce8d2811 | 51 | |
9128618d ER |
52 | %package server |
53 | Summary: Server for Kismet | |
54 | Group: Networking/Daemons | |
55 | Requires(postun): /usr/sbin/groupdel | |
56 | Requires(pre): /usr/sbin/groupadd | |
57 | Provides: group(kismet) | |
58 | ||
59 | %description server | |
60 | This package contains kismet_server which you can access with kismet | |
61 | protocol compatible clients. | |
62 | ||
ce8d2811 | 63 | %prep |
496b93f1 | 64 | %setup -q -n %{name}-%{tarver} |
74f46803 | 65 | %patch0 -p1 |
ce8d2811 | 66 | |
496b93f1 ER |
67 | # make lib64 aware, include exec bits on install |
68 | %{__sed} -i -e 's!\$(prefix)/lib/!%_libdir/!g' plugin-*/Makefile | |
69 | %{__sed} -i -e '/install/ s!-m644!-m755!' plugin-*/Makefile | |
70 | ||
71 | # make %doc friendly | |
72 | for a in plugin-*/README; do | |
73 | mv $a README.${a%/README} | |
74 | done | |
a824f1d9 | 75 | |
69914467 JB |
76 | %build |
77 | cp -f /usr/share/automake/config.* . | |
2be18a10 SZ |
78 | %{__aclocal} |
79 | %{__autoconf} | |
496b93f1 | 80 | %configure |
2be18a10 | 81 | |
6086de01 | 82 | %{__make} |
ce8d2811 | 83 | |
89d87381 | 84 | for plugin in %plugins; do |
496b93f1 ER |
85 | %{__make} -C $plugin \ |
86 | KIS_SRC_DIR=$PWD | |
89d87381 | 87 | done |
88 | ||
ce8d2811 AM |
89 | %install |
90 | rm -rf $RPM_BUILD_ROOT | |
1c58060a | 91 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_datadir},/var/log/%{name}} |
496b93f1 ER |
92 | for dir in . %plugins; do |
93 | %{__make} -C $dir install \ | |
94 | DESTDIR="$RPM_BUILD_ROOT" \ | |
95 | KIS_SRC_DIR=$PWD \ | |
96 | INSTUSR=%(id -un) \ | |
97 | INSTGRP=%(id -gn) \ | |
98 | MANGRP=%(id -gn) | |
89d87381 | 99 | done |
100 | ||
54766e54 ER |
101 | # do what binsuidinstall would do |
102 | install -p kismet_capture $RPM_BUILD_ROOT%{_bindir} | |
103 | ||
ce8d2811 AM |
104 | %clean |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
9128618d ER |
107 | %pre server |
108 | %groupadd -P %{name}-server -g 180 kismet | |
109 | ||
110 | %preun server | |
111 | if [ "$1" = "0" ]; then | |
112 | %groupremove kismet | |
113 | fi | |
114 | ||
ce8d2811 AM |
115 | %files |
116 | %defattr(644,root,root,755) | |
496b93f1 ER |
117 | %doc docs/* CHANGELOG README README.plugin-* |
118 | %attr(755,root,root) %{_bindir}/kismet | |
119 | %attr(755,root,root) %{_bindir}/kismet_client | |
ce8d2811 | 120 | %{_datadir}/%{name} |
496b93f1 ER |
121 | %{_mandir}/man1/kismet.1* |
122 | %{_mandir}/man1/kismet_drone.1* | |
9128618d ER |
123 | %dir %{_libdir}/kismet_client |
124 | %attr(755,root,root) %{_libdir}/kismet_client/btscan_ui.so | |
125 | %attr(755,root,root) %{_libdir}/kismet_client/spectools_ui.so | |
126 | ||
127 | %files server | |
128 | %defattr(644,root,root,755) | |
496b93f1 ER |
129 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet.conf |
130 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_drone.conf | |
9128618d ER |
131 | %attr(4750,root,kismet) %{_bindir}/kismet_capture |
132 | %attr(755,root,root) %{_bindir}/kismet_drone | |
133 | %attr(755,root,root) %{_bindir}/kismet_server | |
134 | %{_mandir}/man5/kismet.conf.5* | |
135 | %{_mandir}/man5/kismet_drone.conf.5* | |
496b93f1 | 136 | %dir %{_libdir}/kismet |
496b93f1 ER |
137 | %attr(755,root,root) %{_libdir}/kismet/aircrack-kismet.so |
138 | %attr(755,root,root) %{_libdir}/kismet/autowep-kismet.so | |
139 | %attr(755,root,root) %{_libdir}/kismet/btscan.so | |
140 | %attr(755,root,root) %{_libdir}/kismet/spectool_net.so | |
9128618d | 141 | %dir %attr(770,root,kismet) /var/log/%{name} |