]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with bladeRF # BladeRF support | |
4 | %bcond_with prelude # libprelude support | |
5 | ||
6 | %define tarver %(echo %{version} | tr _ -) | |
7 | Summary: Wireless network sniffer | |
8 | Summary(pl.UTF-8): Sniffer sieci bezprzewodowych | |
9 | Name: kismet | |
10 | Version: 2022_08_R1 | |
11 | Release: 1 | |
12 | License: GPL v2+ | |
13 | Group: Networking/Utilities | |
14 | Source0: https://www.kismetwireless.net/code/%{name}-%{tarver}.tar.xz | |
15 | # Source0-md5: 7ae3652362ad209a751ab8652cd0ee76 | |
16 | Patch0: opt.patch | |
17 | URL: https://www.kismetwireless.net/ | |
18 | BuildRequires: NetworkManager-devel | |
19 | BuildRequires: autoconf >= 2.57 | |
20 | BuildRequires: automake | |
21 | %{?with_bladeRF:BuildRequires: bladeRF-devel >= 2.2.1} | |
22 | BuildRequires: bluez-libs-devel | |
23 | BuildRequires: elfutils-devel | |
24 | BuildRequires: gmp-devel | |
25 | BuildRequires: libbtbb-devel | |
26 | BuildRequires: libcap-devel | |
27 | BuildRequires: libnl-devel | |
28 | BuildRequires: libpcap-devel >= 2:0.9.4-1 | |
29 | %{?with_prelude:BuildRequires: libprelude-devel >= 1.2.6} | |
30 | BuildRequires: libstdc++-devel >= 6:5 | |
31 | BuildRequires: libunwind-devel | |
32 | BuildRequires: libusb-devel >= 1.0 | |
33 | BuildRequires: libwebsockets-devel >= 3.1.0 | |
34 | BuildRequires: lm_sensors-devel | |
35 | BuildRequires: ncurses-ext-devel | |
36 | BuildRequires: openssl-devel | |
37 | BuildRequires: pcre-devel | |
38 | BuildRequires: protobuf-c-devel | |
39 | BuildRequires: protobuf-devel | |
40 | BuildRequires: pkgconfig | |
41 | BuildRequires: python3 >= 1:3 | |
42 | BuildRequires: python3-setuptools | |
43 | BuildRequires: sed >= 4.0 | |
44 | BuildRequires: sqlite3-devel >= 3 | |
45 | BuildRequires: ubertooth-devel | |
46 | BuildRequires: zlib-devel | |
47 | Requires(postun): /usr/sbin/groupdel | |
48 | Requires(pre,post): /usr/sbin/groupadd | |
49 | Provides: group(kismet) | |
50 | Obsoletes: kismet-server < 2021_05_R1 | |
51 | # it uses internal structures - so strict deps | |
52 | %requires_eq libpcap | |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
54 | ||
55 | %define plugins plugin-alertsyslog plugin-dashboard | |
56 | ||
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 | ||
65 | %description -l pl.UTF-8 | |
66 | Kismet to sniffer bezprzewodowych sieci 802.11b. Jest zdolny do | |
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. | |
72 | ||
73 | %prep | |
74 | %setup -q -n %{name}-%{tarver} | |
75 | %patch0 -p1 | |
76 | ||
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 | |
83 | %{__mv} $a README.${a%/README} | |
84 | done | |
85 | ||
86 | %build | |
87 | cp -f /usr/share/automake/config.* . | |
88 | %{__aclocal} | |
89 | %{__autoconf} | |
90 | %configure \ | |
91 | %{?with_bladeRF:--enable-bladerf} \ | |
92 | %{?with_prelude:--enable-prelude} | |
93 | ||
94 | # -j1 due to OOM | |
95 | %{__make} -j1 | |
96 | ||
97 | for plugin in %plugins; do | |
98 | %{__make} -C $plugin \ | |
99 | KIS_SRC_DIR=$PWD | |
100 | done | |
101 | ||
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_datadir},/var/log/%{name}} | |
105 | ||
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) \ | |
112 | SUIDGROUP=%(id -gn) \ | |
113 | MANGRP=%(id -gn) | |
114 | done | |
115 | ||
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %pre | |
120 | %groupadd -P %{name} -g 180 kismet | |
121 | ||
122 | %postun | |
123 | if [ "$1" = "0" ]; then | |
124 | %groupremove kismet | |
125 | fi | |
126 | ||
127 | %triggerpostun -- kismet-server < 2021_05_R1 | |
128 | %groupadd -P %{name} -g 180 kismet | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
132 | %doc README.md README.plugin-alertsyslog README.plugin-dashboard | |
133 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet.conf | |
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 | |
141 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kismet_wardrive.conf | |
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 | |
158 | %attr(755,root,root) %{_bindir}/kismet_cap_ubertooth_one | |
159 | %attr(755,root,root) %{_bindir}/kismet_discovery | |
160 | %attr(755,root,root) %{_bindir}/kismet_server | |
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} | |
170 | %dir %{_libdir}/kismet | |
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 | |
175 | %{_pkgconfigdir}/kismet.pc | |
176 | %{py3_sitescriptdir}/KismetCapture* |