]>
Commit | Line | Data |
---|---|---|
df27e1a5 | 1 | # TODO: |
41537a2c | 2 | # - consider using CONFIG_PRIVSEP |
486800af | 3 | # - icon for wpa_gui |
51864755 JB |
4 | # |
5 | # Conditional build | |
465476b1 JB |
6 | %bcond_without dbus # D-BUS control interface |
7 | %bcond_without gui # GUI (wpa_gui) package | |
8 | %bcond_with pcsc # PC/SC support for smartcards | |
867e45e1 | 9 | %bcond_without qt5 # use Qt 5 instead of Qt 4 |
f66a8987 | 10 | |
bde40618 | 11 | Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant |
47cec9ef | 12 | Summary(pl.UTF-8): Suplikant WPA/WPA2/RSN/IEEE 802.1X dla Linuksa |
bde40618 | 13 | Name: wpa_supplicant |
5357058f | 14 | Version: 2.10 |
d86fc90d | 15 | Release: 2 |
465476b1 | 16 | License: BSD |
bdc271c3 | 17 | Group: Networking |
b08e6453 | 18 | Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz |
5357058f | 19 | # Source0-md5: d26797fcb002898d4ee989179346e1cc |
bde40618 | 20 | Source1: %{name}.config |
486800af | 21 | Source2: %{name}-wpa_gui.desktop |
29638b4d | 22 | Source3: %{name}.tmpfiles |
f66a8987 | 23 | Source4: %{name}.service |
bde40618 | 24 | Patch0: %{name}-makefile.patch |
5357058f | 25 | Patch1: %{name}-gui-qt4.patch |
4771e8c9 | 26 | # http://www.linuxwimax.org/Download |
5357058f JB |
27 | Patch2: %{name}-0.7.2-generate-libeap-peer.patch |
28 | Patch3: dbus-services.patch | |
b08e6453 | 29 | URL: http://w1.fi/wpa_supplicant/ |
19aba961 | 30 | %{?with_dbus:BuildRequires: dbus-devel} |
d8a4d054 | 31 | BuildRequires: libnl-devel >= 1:3.5 |
2af19e57 | 32 | BuildRequires: ncurses-devel |
bde40618 | 33 | BuildRequires: openssl-devel |
465476b1 | 34 | %{?with_pcsc:BuildRequires: pcsc-lite-devel} |
8f834f15 | 35 | BuildRequires: pkgconfig |
c299b6ab | 36 | BuildRequires: rpmbuild(macros) >= 1.647 |
bed81893 | 37 | %if %{with gui} |
465476b1 JB |
38 | %if %{with qt5} |
39 | BuildRequires: Qt5Gui-devel >= 5 | |
40 | BuildRequires: Qt5Widgets-devel >= 5 | |
41 | BuildRequires: qt5-build >= 5 | |
867e45e1 | 42 | BuildRequires: qt5-linguist >= 5.13.0-3 |
465476b1 JB |
43 | BuildRequires: qt5-qmake >= 5 |
44 | %else | |
45 | BuildRequires: QtGui-devel >= 4 | |
46 | BuildRequires: qt4-build >= 4 | |
47 | BuildRequires: qt4-linguist >= 4 | |
48 | BuildRequires: qt4-qmake >= 4 | |
49 | %endif | |
bed81893 | 50 | %endif |
bde40618 | 51 | BuildRequires: readline-devel |
53789b76 | 52 | BuildRequires: sed >= 4.0 |
f85cfd26 | 53 | Requires: rc-scripts >= 0.4.1.24 |
f66a8987 | 54 | Requires: systemd-units >= 38 |
d86fc90d | 55 | Suggests: %{name}-utils = %{version}-%{release} |
bde40618 | 56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
465476b1 JB |
58 | %define qtver %{?with_qt5:5}%{!?with_qt5:4} |
59 | ||
bde40618 | 60 | %description |
bdc271c3 AG |
61 | wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE |
62 | 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is | |
63 | used in the client stations. It implements key negotiation with a WPA | |
64 | Authenticator and it controls the roaming and IEEE 802.11 | |
bde40618 | 65 | authentication/association of the wlan driver. |
66 | ||
855d62cf | 67 | wpa_supplicant is designed to be a "daemon" program that runs in the |
68 | background and acts as the backend component controlling the wireless | |
69 | connection. Support for separate frontend programs is included and an | |
70 | example text-based frontend, wpa_cli, is included with wpa_supplicant. | |
71 | ||
72 | Supported WPA/IEEE 802.11i features: | |
73 | - WPA-PSK ("WPA-Personal") | |
90dcf215 JB |
74 | - WPA with EAP (e.g., with RADIUS authentication server) |
75 | ("WPA-Enterprise") (currently, EAP-TLS and EAP-PEAP/MSCHAPv2 are | |
76 | supported with an integrated IEEE 802.1X Supplicant; other EAP types | |
77 | may be used with an external program, Xsupplicant) | |
855d62cf | 78 | - key management for CCMP, TKIP, WEP104, WEP40 |
79 | - RSN/WPA2 (IEEE 802.11i) | |
80 | ||
6c208807 JR |
81 | %description -l pl.UTF-8 |
82 | wpa_supplicant to suplikant WPA z obsługą WPA oraz WPA2 (IEEE 802.11i | |
83 | / RSN). Suplikant to element IEEE 802.1X/WPA używany na stacjach | |
84 | klienckich. Implementuje negocjację kluczy z elementem | |
85 | uwierzytelniającym WPA (WPA Authenticator) i kontroluje roaming oraz | |
90dcf215 JB |
86 | uwierzytelnianie/kojarzenie sterownika wlan zgodnie z IEEE 802.11. |
87 | ||
6c208807 JR |
88 | wpa_supplicant jest zaprojektowany tak, by był wspólnym programem |
89 | działającym w tle i działa jako element backendu sterujący połączeniem | |
90 | bezprzewodowym. Dostępna jest obsługa oddzielnych programów | |
91 | frontendowych, a w pakiecie wpa_supplicant załączony jest prosty | |
90dcf215 JB |
92 | frontend tekstowy - wpa_cli. |
93 | ||
6c208807 | 94 | Obsługiwane możliwości WPA/IEEE 802.11i: |
90dcf215 | 95 | - WPA-PSK ("WPA-Personal") |
6c208807 JR |
96 | - WPA z EAP (np. z serwerem uwierzytleniającym RADIUS) |
97 | ("WPA-Enterprise") (aktualnie EAP-TLS i EAP-PEAP/MSCHAPv2 są | |
98 | obsługiwane przez załączonego suplikanta IEEE 802.1X; inne rodzaje EAP | |
99 | mogą być używane przez zewnętrzny program - Xsupplicant) | |
100 | - zarządzanie kluczy dla CCMP, TKIP, WEP104, WEP40 | |
90dcf215 | 101 | - RSN/WPA2 (IEEE 802.11i) |
bde40618 | 102 | |
d86fc90d JP |
103 | %package utils |
104 | Summary: wpa_supplicant utilities | |
105 | Summary(pl.UTF-8): Narzędzia dla wpa_supplicant | |
b4a6dd4d | 106 | Group: Networking |
d86fc90d JP |
107 | |
108 | %description utils | |
109 | wpa_supplicant utilities. | |
110 | ||
111 | %description utils -l pl.UTF-8 | |
112 | Narzędzia dla wpa_supplicant. | |
113 | ||
df27e1a5 PG |
114 | %package -n wpa_gui |
115 | Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI | |
47cec9ef | 116 | Summary(pl.UTF-8): Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa |
df27e1a5 | 117 | Group: X11/Applications/Networking |
65b10057 | 118 | Requires(post,postun): desktop-file-utils |
fcaa0e79 | 119 | Requires: %{name} = %{version}-%{release} |
df27e1a5 PG |
120 | |
121 | %description -n wpa_gui | |
fcaa0e79 JB |
122 | Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI. |
123 | ||
6c208807 | 124 | %description -n wpa_gui -l pl.UTF-8 |
fcaa0e79 | 125 | Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa. |
df27e1a5 | 126 | |
4771e8c9 MB |
127 | %package -n libeap |
128 | Summary: EAP Peer library | |
129 | Summary(pl.UTF-8): Biblioteka EAP Peer | |
130 | Group: Libraries | |
131 | ||
132 | %description -n libeap | |
133 | EAP Peer library. | |
134 | ||
135 | %description -n libeap -l pl.UTF-8 | |
136 | Biblioteka EAP Peer. | |
137 | ||
138 | %package -n libeap-devel | |
139 | Summary: Development files for eap library | |
140 | Summary(pl.UTF-8): Pliki programistyczne dla biblioteki eap | |
141 | Group: Development/Libraries | |
142 | Requires: libeap = %{version}-%{release} | |
143 | ||
144 | %description -n libeap-devel | |
145 | Development files for eap library. | |
146 | ||
147 | %description -n libeap-devel -l pl.UTF-8 | |
148 | Pliki programistyczne dla biblioteki eap. | |
149 | ||
bde40618 | 150 | %prep |
151 | %setup -q | |
152 | %patch0 -p1 | |
0d44a591 | 153 | %patch1 -p1 |
d8a4d054 | 154 | %patch2 -p1 |
bd214586 | 155 | %patch3 -p1 |
bde40618 | 156 | |
53789b76 MB |
157 | %{__sed} -i -e 's,@LIB@,%{_lib},' src/eap_peer/libeap0.pc |
158 | ||
8b73356c | 159 | cp -p %{SOURCE1} wpa_supplicant/.config |
bde40618 | 160 | |
19aba961 MB |
161 | %if %{with dbus} |
162 | echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config | |
f1257d27 MB |
163 | echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config |
164 | echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config | |
19aba961 MB |
165 | %endif |
166 | ||
465476b1 JB |
167 | %if %{with pcsc} |
168 | echo 'CONFIG_PCSC=y' >> wpa_supplicant/.config | |
169 | echo 'CONFIG_EAP_SIM=y' >> wpa_supplicant/.config | |
170 | echo 'CONFIG_EAP_AKA=y' >> wpa_supplicant/.config | |
171 | echo 'CONFIG_EAP_AKA_PRIME=y' >> wpa_supplicant/.config | |
172 | %endif | |
173 | ||
bde40618 | 174 | %build |
5357058f | 175 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ |
01adb5d5 | 176 | %{__make} -C wpa_supplicant \ |
5bc65950 | 177 | V=1 \ |
2af19e57 | 178 | CC="%{__cc}" \ |
43e2545a | 179 | BINDIR="%{_sbindir}" \ |
5357058f | 180 | LDFLAGS="%{rpmldflags}" |
bde40618 | 181 | |
35d6fc22 | 182 | # eapol_test: |
5357058f | 183 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ |
35d6fc22 | 184 | %{__make} -C wpa_supplicant eapol_test \ |
5bc65950 | 185 | V=1 \ |
35d6fc22 | 186 | CC="%{__cc}" \ |
5357058f | 187 | LDFLAGS="%{rpmldflags}" |
35d6fc22 | 188 | |
bed81893 | 189 | %if %{with gui} |
b194f08b | 190 | cd wpa_supplicant/wpa_gui-qt4 |
465476b1 | 191 | qmake-qt%{qtver} -o Makefile wpa_gui.pro \ |
de1f0e4e JB |
192 | QMAKE_CXX="%{__cxx}" \ |
193 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
194 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" | |
b194f08b | 195 | cd ../.. |
01adb5d5 | 196 | %{__make} -C wpa_supplicant wpa_gui-qt4 \ |
5bc65950 | 197 | V=1 \ |
465476b1 | 198 | QTDIR=%{_libdir}/qt%{qtver} \ |
629e9bfc | 199 | QMAKE='qmake-qt%{qtver}' \ |
d8a4d054 | 200 | LRELEASE='%{_libdir}/qt%{qtver}/bin/lrelease' \ |
465476b1 | 201 | UIC=%{_bindir}/uic-qt%{qtver} |
bed81893 | 202 | %endif |
df27e1a5 | 203 | |
5357058f JB |
204 | %{__make} -C src/eap_peer -f Makefile.libeap clean |
205 | %{__make} -C src/eap_peer -f Makefile.libeap \ | |
4771e8c9 | 206 | CC="%{__cc}" \ |
d8a4d054 | 207 | CFLAGS="%{rpmcppflags} %{rpmcflags} -MMD -Wall $(pkg-config --cflags libnl-3.0) -DTLS_DEFAULT_CIPHERS=\\\"PROFILE=SYSTEM:3DES\\\"" \ |
de1f0e4e | 208 | LDFLAGS="%{rpmldflags} -shared" |
4771e8c9 | 209 | |
bde40618 | 210 | %install |
211 | rm -rf $RPM_BUILD_ROOT | |
29638b4d | 212 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_sbindir},%{_desktopdir},/var/run/%{name},%{_sysconfdir}} \ |
f66a8987 | 213 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} |
5f8b0164 | 214 | |
43e2545a | 215 | install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir} |
61cc9b2e | 216 | install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_bindir} |
43e2545a | 217 | install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir} |
4771e8c9 | 218 | |
43e2545a | 219 | cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir} |
bde40618 | 220 | |
43e2545a ER |
221 | cp -p wpa_supplicant/doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
222 | cp -p wpa_supplicant/doc/docbook/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
75221d1f | 223 | |
8564a188 | 224 | %{!?with_gui:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_gui.8} |
41537a2c JB |
225 | # program exists with CONFIG_PRIVSEP only |
226 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_priv.8 | |
227 | ||
19aba961 MB |
228 | %if %{with dbus} |
229 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services} | |
43e2545a ER |
230 | cp -p wpa_supplicant/dbus/dbus-wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf |
231 | cp -p wpa_supplicant/dbus/*.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services | |
f66a8987 | 232 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service |
19aba961 MB |
233 | %endif |
234 | ||
bed81893 | 235 | %if %{with gui} |
43e2545a ER |
236 | install -p wpa_supplicant/wpa_gui-qt4/wpa_gui $RPM_BUILD_ROOT%{_bindir} |
237 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop | |
bed81893 | 238 | %endif |
df27e1a5 | 239 | |
43e2545a ER |
240 | install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir} |
241 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
29638b4d | 242 | |
5357058f | 243 | %{__make} -C src/eap_peer -f Makefile.libeap install \ |
53789b76 MB |
244 | DESTDIR=$RPM_BUILD_ROOT \ |
245 | LIBDIR=%{_libdir} | |
4771e8c9 | 246 | |
bde40618 | 247 | %clean |
248 | rm -rf $RPM_BUILD_ROOT | |
249 | ||
c299b6ab | 250 | %post |
be59c8f2 | 251 | %systemd_post wpa_supplicant.service |
c299b6ab JR |
252 | |
253 | %preun | |
254 | %systemd_preun wpa_supplicant.service | |
255 | ||
256 | %postun | |
257 | %systemd_reload | |
258 | ||
65b10057 JP |
259 | %post -n wpa_gui |
260 | %update_desktop_database_post | |
261 | ||
262 | %postun -n wpa_gui | |
263 | %update_desktop_database_postun | |
264 | ||
41537a2c JB |
265 | %post -n libeap -p /sbin/ldconfig |
266 | %postun -n libeap -p /sbin/ldconfig | |
4771e8c9 | 267 | |
bde40618 | 268 | %files |
269 | %defattr(644,root,root,755) | |
465476b1 | 270 | %doc COPYING wpa_supplicant/{ChangeLog,README,README-{HS20,P2P,WPS},eap_testing.txt,todo.txt,*wpa_supplicant.conf,examples} |
bdc271c3 | 271 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |
35d6fc22 | 272 | %attr(755,root,root) %{_bindir}/eapol_test |
41537a2c | 273 | %attr(755,root,root) %{_sbindir}/wpa_cli |
41537a2c | 274 | %attr(755,root,root) %{_sbindir}/wpa_supplicant |
9d11e01d | 275 | %attr(750,root,root) %ghost %dir /var/run/%{name} |
f66a8987 | 276 | %{systemdtmpfilesdir}/%{name}.conf |
41537a2c | 277 | %{_mandir}/man5/wpa_supplicant.conf.5* |
bb5696df | 278 | %{_mandir}/man8/eapol_test.8* |
41537a2c JB |
279 | %{_mandir}/man8/wpa_background.8* |
280 | %{_mandir}/man8/wpa_cli.8* | |
41537a2c | 281 | %{_mandir}/man8/wpa_supplicant.8* |
19aba961 | 282 | %if %{with dbus} |
4ea51389 | 283 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/wpa_supplicant.conf |
f1257d27 | 284 | %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service |
f66a8987 | 285 | %{systemdunitdir}/%{name}.service |
19aba961 | 286 | %endif |
df27e1a5 | 287 | |
d86fc90d JP |
288 | %files utils |
289 | %defattr(644,root,root,755) | |
61cc9b2e | 290 | %attr(755,root,root) %{_bindir}/wpa_passphrase |
d86fc90d JP |
291 | %{_mandir}/man8/wpa_passphrase.8* |
292 | ||
bed81893 | 293 | %if %{with gui} |
df27e1a5 PG |
294 | %files -n wpa_gui |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{_bindir}/wpa_gui | |
41537a2c | 297 | %{_mandir}/man8/wpa_gui.8* |
486800af | 298 | %{_desktopdir}/wpa_gui.desktop |
bed81893 | 299 | %endif |
4771e8c9 MB |
300 | |
301 | %files -n libeap | |
302 | %defattr(644,root,root,755) | |
303 | %attr(755,root,root) %{_libdir}/libeap.so.*.*.* | |
41537a2c | 304 | %attr(755,root,root) %ghost %{_libdir}/libeap.so.0 |
4771e8c9 MB |
305 | |
306 | %files -n libeap-devel | |
307 | %defattr(644,root,root,755) | |
308 | %attr(755,root,root) %{_libdir}/libeap.so | |
309 | %{_includedir}/eap_peer | |
310 | %{_pkgconfigdir}/libeap0.pc |