]>
Commit | Line | Data |
---|---|---|
d1737b36 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bladeRF # BladeRF support | |
4 | %bcond_with prelude # libprelude support | |
5 | ||
496b93f1 | 6 | %define tarver %(echo %{version} | tr _ -) |
ce8d2811 | 7 | Summary: Wireless network sniffer |
3197fdd7 | 8 | Summary(pl.UTF-8): Sniffer sieci bezprzewodowych |
ce8d2811 | 9 | Name: kismet |
2d53b513 | 10 | Version: 2022_08_R1 |
f5a0db06 JB |
11 | Release: 1 |
12 | License: GPL v2+ | |
ce8d2811 | 13 | Group: Networking/Utilities |
2d53b513 JB |
14 | Source0: https://www.kismetwireless.net/code/%{name}-%{tarver}.tar.xz |
15 | # Source0-md5: 7ae3652362ad209a751ab8652cd0ee76 | |
fecf00c7 | 16 | Patch0: opt.patch |
2d53b513 | 17 | URL: https://www.kismetwireless.net/ |
f5a0db06 JB |
18 | BuildRequires: NetworkManager-devel |
19 | BuildRequires: autoconf >= 2.57 | |
58c65496 | 20 | BuildRequires: automake |
d1737b36 | 21 | %{?with_bladeRF:BuildRequires: bladeRF-devel >= 2.2.1} |
412db6e5 | 22 | BuildRequires: bluez-libs-devel |
f5a0db06 | 23 | BuildRequires: elfutils-devel |
7d77e3fc | 24 | BuildRequires: gmp-devel |
d1737b36 | 25 | BuildRequires: libbtbb-devel |
412db6e5 | 26 | BuildRequires: libcap-devel |
399fadea | 27 | BuildRequires: libnl-devel |
387a2d36 | 28 | BuildRequires: libpcap-devel >= 2:0.9.4-1 |
d1737b36 | 29 | %{?with_prelude:BuildRequires: libprelude-devel >= 1.2.6} |
f5a0db06 JB |
30 | BuildRequires: libstdc++-devel >= 6:5 |
31 | BuildRequires: libunwind-devel | |
32 | BuildRequires: libusb-devel >= 1.0 | |
8d802250 | 33 | BuildRequires: libwebsockets-devel >= 3.1.0 |
f5a0db06 | 34 | BuildRequires: lm_sensors-devel |
92c7dc22 | 35 | BuildRequires: ncurses-ext-devel |
412db6e5 | 36 | BuildRequires: openssl-devel |
37 | BuildRequires: pcre-devel | |
f5a0db06 JB |
38 | BuildRequires: protobuf-c-devel |
39 | BuildRequires: protobuf-devel | |
9cf4f36b | 40 | BuildRequires: pkgconfig |
f5a0db06 JB |
41 | BuildRequires: python3 >= 1:3 |
42 | BuildRequires: python3-setuptools | |
496b93f1 | 43 | BuildRequires: sed >= 4.0 |
f5a0db06 | 44 | BuildRequires: sqlite3-devel >= 3 |
d1737b36 | 45 | BuildRequires: ubertooth-devel |
f5a0db06 | 46 | BuildRequires: zlib-devel |
8d802250 | 47 | Requires(postun): /usr/sbin/groupdel |
f5a0db06 | 48 | Requires(pre,post): /usr/sbin/groupadd |
8d802250 JR |
49 | Provides: group(kismet) |
50 | Obsoletes: kismet-server < 2021_05_R1 | |
58c65496 JB |
51 | # it uses internal structures - so strict deps |
52 | %requires_eq libpcap | |
472ae821 | 53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ce8d2811 | 54 | |
d7f9660c | 55 | %define plugins plugin-alertsyslog plugin-dashboard |
89d87381 | 56 | |
ce8d2811 AM |
57 | %description |
58 | Kismet is a 802.11b wireless network sniffer. It is capable of | |
59 | sniffing using almost any wireless card supported in Linux, including | |
60 | Prism2 based cards supported by the Wlan-NG project (Linksys, Dlink, | |
61 | Rangelan, etc), cards which support standard packet capture via | |
62 | libpcap (Cisco), and limited support for cards without RF Monitor | |
63 | support. | |
64 | ||
280f6f5a | 65 | %description -l pl.UTF-8 |
ce8d2811 | 66 | Kismet to sniffer bezprzewodowych sieci 802.11b. Jest zdolny do |
280f6f5a JR |
67 | sniffowania używając prawie dowolnych bezprzewodowych kart sieciowych |
68 | w Linuksie włączając w to karty Prism2 wspierane przez projekt Wlan-NG | |
69 | (Linksys, Dlink, Rangelan, etc), kart które umożliwiają | |
70 | przechwytywanie pakietów poprzez libpcap (Cisco), oraz ograniczone | |
71 | wsparcie dla kart bez obsługi Monitora RF. | |
ce8d2811 AM |
72 | |
73 | %prep | |
496b93f1 | 74 | %setup -q -n %{name}-%{tarver} |
fecf00c7 | 75 | %patch0 -p1 |
ce8d2811 | 76 | |
496b93f1 ER |
77 | # make lib64 aware, include exec bits on install |
78 | %{__sed} -i -e 's!\$(prefix)/lib/!%_libdir/!g' plugin-*/Makefile | |
79 | %{__sed} -i -e '/install/ s!-m644!-m755!' plugin-*/Makefile | |
80 | ||
81 | # make %doc friendly | |
82 | for a in plugin-*/README; do | |
f5a0db06 | 83 | %{__mv} $a README.${a%/README} |
496b93f1 | 84 | done |
a824f1d9 | 85 | |
69914467 JB |
86 | %build |
87 | cp -f /usr/share/automake/config.* . | |
2be18a10 SZ |
88 | %{__aclocal} |
89 | %{__autoconf} | |
d1737b36 JB |
90 | %configure \ |
91 | %{?with_bladeRF:--enable-bladerf} \ | |
92 | %{?with_prelude:--enable-prelude} | |
2be18a10 | 93 | |
d7f9660c JR |
94 | # -j1 due to OOM |
95 | %{__make} -j1 | |
ce8d2811 | 96 | |
89d87381 | 97 | for plugin in %plugins; do |
496b93f1 ER |
98 | %{__make} -C $plugin \ |
99 | KIS_SRC_DIR=$PWD | |
89d87381 | 100 | done |
101 | ||
ce8d2811 AM |
102 | %install |
103 | rm -rf $RPM_BUILD_ROOT | |
1c58060a | 104 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_datadir},/var/log/%{name}} |
f5a0db06 | 105 | |
496b93f1 ER |
106 | for dir in . %plugins; do |
107 | %{__make} -C $dir install \ | |
108 | DESTDIR="$RPM_BUILD_ROOT" \ | |
109 | KIS_SRC_DIR=$PWD \ | |
110 | INSTUSR=%(id -un) \ | |
111 | INSTGRP=%(id -gn) \ | |
d7f9660c | 112 | SUIDGROUP=%(id -gn) \ |
496b93f1 | 113 | MANGRP=%(id -gn) |
89d87381 | 114 | done |
115 | ||
ce8d2811 AM |
116 | %clean |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
8d802250 JR |
119 | %pre |
120 | %groupadd -P %{name} -g 180 kismet | |
9128618d | 121 | |
f5a0db06 | 122 | %postun |
9128618d ER |
123 | if [ "$1" = "0" ]; then |
124 | %groupremove kismet | |
125 | fi | |
126 | ||
8d802250 JR |
127 | %triggerpostun -- kismet-server < 2021_05_R1 |
128 | %groupadd -P %{name} -g 180 kismet | |
9128618d | 129 | |
8d802250 | 130 | %files |
9128618d | 131 | %defattr(644,root,root,755) |
8d802250 | 132 | %doc README.md README.plugin-alertsyslog README.plugin-dashboard |
496b93f1 | 133 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet.conf |
8d802250 JR |
134 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_80211.conf |
135 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_alerts.conf | |
136 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_filter.conf | |
137 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_httpd.conf | |
138 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_logging.conf | |
139 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_memory.conf | |
140 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_uav.conf | |
f5a0db06 | 141 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_wardrive.conf |
8d802250 JR |
142 | %attr(755,root,root) %{_bindir}/kismet |
143 | %attr(755,root,root) %{_bindir}/kismet_cap_freaklabs_zigbee | |
144 | %attr(755,root,root) %{_bindir}/kismet_cap_kismetdb | |
145 | %attr(755,root,root) %{_bindir}/kismet_cap_linux_bluetooth | |
146 | %attr(755,root,root) %{_bindir}/kismet_cap_linux_wifi | |
147 | %attr(755,root,root) %{_bindir}/kismet_cap_nrf_51822 | |
148 | %attr(755,root,root) %{_bindir}/kismet_cap_nrf_52840 | |
149 | %attr(755,root,root) %{_bindir}/kismet_cap_nrf_mousejack | |
150 | %attr(755,root,root) %{_bindir}/kismet_cap_nxp_kw41z | |
151 | %attr(755,root,root) %{_bindir}/kismet_cap_pcapfile | |
152 | %attr(755,root,root) %{_bindir}/kismet_cap_rz_killerbee | |
153 | %attr(755,root,root) %{_bindir}/kismet_cap_sdr_rtl433 | |
154 | %attr(755,root,root) %{_bindir}/kismet_cap_sdr_rtladsb | |
155 | %attr(755,root,root) %{_bindir}/kismet_cap_sdr_rtlamr | |
156 | %attr(755,root,root) %{_bindir}/kismet_cap_ti_cc_2531 | |
157 | %attr(755,root,root) %{_bindir}/kismet_cap_ti_cc_2540 | |
d1737b36 | 158 | %attr(755,root,root) %{_bindir}/kismet_cap_ubertooth_one |
8d802250 | 159 | %attr(755,root,root) %{_bindir}/kismet_discovery |
9128618d | 160 | %attr(755,root,root) %{_bindir}/kismet_server |
8d802250 JR |
161 | %attr(755,root,root) %{_bindir}/kismetdb_clean |
162 | %attr(755,root,root) %{_bindir}/kismetdb_dump_devices | |
163 | %attr(755,root,root) %{_bindir}/kismetdb_statistics | |
164 | %attr(755,root,root) %{_bindir}/kismetdb_strip_packets | |
165 | %attr(755,root,root) %{_bindir}/kismetdb_to_gpx | |
166 | %attr(755,root,root) %{_bindir}/kismetdb_to_kml | |
167 | %attr(755,root,root) %{_bindir}/kismetdb_to_pcap | |
168 | %attr(755,root,root) %{_bindir}/kismetdb_to_wiglecsv | |
169 | %{_datadir}/%{name} | |
496b93f1 | 170 | %dir %{_libdir}/kismet |
8d802250 JR |
171 | %dir %{_libdir}/kismet/alertsyslog |
172 | %attr(755,root,root) %{_libdir}/kismet/alertsyslog/alertsyslog.so | |
173 | %{_libdir}/kismet/alertsyslog/manifest.conf | |
174 | %{_libdir}/kismet/dashboard | |
f5a0db06 | 175 | %{_pkgconfigdir}/kismet.pc |
b9c5e344 | 176 | %{py3_sitescriptdir}/KismetCapture* |