]>
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 |
d8a4d054 AM |
14 | Version: 2.9 |
15 | Release: 1 | |
465476b1 | 16 | License: BSD |
bdc271c3 | 17 | Group: Networking |
b08e6453 | 18 | Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz |
d8a4d054 | 19 | # Source0-md5: 2d2958c782576dc9901092fbfecb4190 |
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 |
19721d40 | 25 | Patch1: %{name}-OPTCFLAGS.patch |
d8a4d054 | 26 | Patch2: %{name}-gui-qt4.patch |
4771e8c9 | 27 | # http://www.linuxwimax.org/Download |
bd214586 JB |
28 | Patch3: %{name}-0.7.2-generate-libeap-peer.patch |
29 | Patch4: dbus-services.patch | |
b08e6453 | 30 | URL: http://w1.fi/wpa_supplicant/ |
19aba961 | 31 | %{?with_dbus:BuildRequires: dbus-devel} |
d8a4d054 | 32 | BuildRequires: libnl-devel >= 1:3.5 |
2af19e57 | 33 | BuildRequires: ncurses-devel |
bde40618 | 34 | BuildRequires: openssl-devel |
465476b1 | 35 | %{?with_pcsc:BuildRequires: pcsc-lite-devel} |
8f834f15 | 36 | BuildRequires: pkgconfig |
c299b6ab | 37 | BuildRequires: rpmbuild(macros) >= 1.647 |
bed81893 | 38 | %if %{with gui} |
465476b1 JB |
39 | %if %{with qt5} |
40 | BuildRequires: Qt5Gui-devel >= 5 | |
41 | BuildRequires: Qt5Widgets-devel >= 5 | |
42 | BuildRequires: qt5-build >= 5 | |
867e45e1 | 43 | BuildRequires: qt5-linguist >= 5.13.0-3 |
465476b1 JB |
44 | BuildRequires: qt5-qmake >= 5 |
45 | %else | |
46 | BuildRequires: QtGui-devel >= 4 | |
47 | BuildRequires: qt4-build >= 4 | |
48 | BuildRequires: qt4-linguist >= 4 | |
49 | BuildRequires: qt4-qmake >= 4 | |
50 | %endif | |
bed81893 | 51 | %endif |
bde40618 | 52 | BuildRequires: readline-devel |
53789b76 | 53 | BuildRequires: sed >= 4.0 |
f85cfd26 | 54 | Requires: rc-scripts >= 0.4.1.24 |
f66a8987 | 55 | Requires: systemd-units >= 38 |
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 | |
df27e1a5 PG |
103 | %package -n wpa_gui |
104 | Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI | |
47cec9ef | 105 | Summary(pl.UTF-8): Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa |
df27e1a5 | 106 | Group: X11/Applications/Networking |
fcaa0e79 | 107 | Requires: %{name} = %{version}-%{release} |
df27e1a5 PG |
108 | |
109 | %description -n wpa_gui | |
fcaa0e79 JB |
110 | Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI. |
111 | ||
6c208807 | 112 | %description -n wpa_gui -l pl.UTF-8 |
fcaa0e79 | 113 | Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa. |
df27e1a5 | 114 | |
4771e8c9 MB |
115 | %package -n libeap |
116 | Summary: EAP Peer library | |
117 | Summary(pl.UTF-8): Biblioteka EAP Peer | |
118 | Group: Libraries | |
119 | ||
120 | %description -n libeap | |
121 | EAP Peer library. | |
122 | ||
123 | %description -n libeap -l pl.UTF-8 | |
124 | Biblioteka EAP Peer. | |
125 | ||
126 | %package -n libeap-devel | |
127 | Summary: Development files for eap library | |
128 | Summary(pl.UTF-8): Pliki programistyczne dla biblioteki eap | |
129 | Group: Development/Libraries | |
130 | Requires: libeap = %{version}-%{release} | |
131 | ||
132 | %description -n libeap-devel | |
133 | Development files for eap library. | |
134 | ||
135 | %description -n libeap-devel -l pl.UTF-8 | |
136 | Pliki programistyczne dla biblioteki eap. | |
137 | ||
bde40618 | 138 | %prep |
139 | %setup -q | |
140 | %patch0 -p1 | |
0d44a591 | 141 | %patch1 -p1 |
d8a4d054 | 142 | %patch2 -p1 |
bd214586 | 143 | %patch3 -p1 |
4771e8c9 | 144 | %patch4 -p1 |
bde40618 | 145 | |
53789b76 MB |
146 | %{__sed} -i -e 's,@LIB@,%{_lib},' src/eap_peer/libeap0.pc |
147 | ||
8b73356c | 148 | cp -p %{SOURCE1} wpa_supplicant/.config |
bde40618 | 149 | |
19aba961 MB |
150 | %if %{with dbus} |
151 | echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config | |
f1257d27 MB |
152 | echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config |
153 | echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config | |
19aba961 MB |
154 | %endif |
155 | ||
465476b1 JB |
156 | %if %{with pcsc} |
157 | echo 'CONFIG_PCSC=y' >> wpa_supplicant/.config | |
158 | echo 'CONFIG_EAP_SIM=y' >> wpa_supplicant/.config | |
159 | echo 'CONFIG_EAP_AKA=y' >> wpa_supplicant/.config | |
160 | echo 'CONFIG_EAP_AKA_PRIME=y' >> wpa_supplicant/.config | |
161 | %endif | |
162 | ||
bde40618 | 163 | %build |
01adb5d5 | 164 | %{__make} -C wpa_supplicant \ |
5bc65950 | 165 | V=1 \ |
2af19e57 | 166 | CC="%{__cc}" \ |
43e2545a | 167 | BINDIR="%{_sbindir}" \ |
c35099eb | 168 | LDFLAGS="%{rpmldflags}" \ |
de1f0e4e | 169 | OPTCFLAGS="%{rpmcppflags} %{rpmcflags}" |
bde40618 | 170 | |
35d6fc22 PG |
171 | # eapol_test: |
172 | %{__make} -C wpa_supplicant eapol_test \ | |
5bc65950 | 173 | V=1 \ |
35d6fc22 PG |
174 | CC="%{__cc}" \ |
175 | LDFLAGS="%{rpmldflags}" \ | |
19721d40 | 176 | OPTCFLAGS="%{rpmcppflags} %{rpmcflags}" |
35d6fc22 | 177 | |
bed81893 | 178 | %if %{with gui} |
b194f08b | 179 | cd wpa_supplicant/wpa_gui-qt4 |
465476b1 | 180 | qmake-qt%{qtver} -o Makefile wpa_gui.pro \ |
de1f0e4e JB |
181 | QMAKE_CXX="%{__cxx}" \ |
182 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
183 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" | |
b194f08b | 184 | cd ../.. |
01adb5d5 | 185 | %{__make} -C wpa_supplicant wpa_gui-qt4 \ |
5bc65950 | 186 | V=1 \ |
465476b1 | 187 | QTDIR=%{_libdir}/qt%{qtver} \ |
629e9bfc | 188 | QMAKE='qmake-qt%{qtver}' \ |
d8a4d054 | 189 | LRELEASE='%{_libdir}/qt%{qtver}/bin/lrelease' \ |
465476b1 | 190 | UIC=%{_bindir}/uic-qt%{qtver} |
bed81893 | 191 | %endif |
df27e1a5 | 192 | |
4771e8c9 MB |
193 | %{__make} -C src/eap_peer clean |
194 | %{__make} -C src/eap_peer \ | |
195 | CC="%{__cc}" \ | |
d8a4d054 | 196 | CFLAGS="%{rpmcppflags} %{rpmcflags} -MMD -Wall $(pkg-config --cflags libnl-3.0) -DTLS_DEFAULT_CIPHERS=\\\"PROFILE=SYSTEM:3DES\\\"" \ |
de1f0e4e | 197 | LDFLAGS="%{rpmldflags} -shared" |
4771e8c9 | 198 | |
bde40618 | 199 | %install |
200 | rm -rf $RPM_BUILD_ROOT | |
29638b4d | 201 | install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_sbindir},%{_desktopdir},/var/run/%{name},%{_sysconfdir}} \ |
f66a8987 | 202 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} |
5f8b0164 | 203 | |
43e2545a ER |
204 | install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir} |
205 | install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_sbindir} | |
206 | install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir} | |
4771e8c9 | 207 | |
43e2545a | 208 | cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir} |
bde40618 | 209 | |
43e2545a ER |
210 | cp -p wpa_supplicant/doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5 |
211 | cp -p wpa_supplicant/doc/docbook/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
75221d1f | 212 | |
41537a2c JB |
213 | # program exists with CONFIG_PRIVSEP only |
214 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_priv.8 | |
215 | ||
19aba961 MB |
216 | %if %{with dbus} |
217 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services} | |
43e2545a ER |
218 | cp -p wpa_supplicant/dbus/dbus-wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf |
219 | cp -p wpa_supplicant/dbus/*.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services | |
f66a8987 | 220 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service |
19aba961 MB |
221 | %endif |
222 | ||
bed81893 | 223 | %if %{with gui} |
43e2545a ER |
224 | install -p wpa_supplicant/wpa_gui-qt4/wpa_gui $RPM_BUILD_ROOT%{_bindir} |
225 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop | |
bed81893 | 226 | %endif |
df27e1a5 | 227 | |
43e2545a ER |
228 | install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir} |
229 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
29638b4d | 230 | |
4771e8c9 | 231 | %{__make} -C src/eap_peer install \ |
53789b76 MB |
232 | DESTDIR=$RPM_BUILD_ROOT \ |
233 | LIBDIR=%{_libdir} | |
4771e8c9 | 234 | |
bde40618 | 235 | %clean |
236 | rm -rf $RPM_BUILD_ROOT | |
237 | ||
c299b6ab JR |
238 | %post |
239 | %systemd_reload | |
240 | %systemd_service_restart wpa_supplicant.service | |
241 | ||
242 | %preun | |
243 | %systemd_preun wpa_supplicant.service | |
244 | ||
245 | %postun | |
246 | %systemd_reload | |
247 | ||
41537a2c JB |
248 | %post -n libeap -p /sbin/ldconfig |
249 | %postun -n libeap -p /sbin/ldconfig | |
4771e8c9 | 250 | |
bde40618 | 251 | %files |
252 | %defattr(644,root,root,755) | |
465476b1 | 253 | %doc COPYING wpa_supplicant/{ChangeLog,README,README-{HS20,P2P,WPS},eap_testing.txt,todo.txt,*wpa_supplicant.conf,examples} |
bdc271c3 | 254 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |
35d6fc22 | 255 | %attr(755,root,root) %{_bindir}/eapol_test |
41537a2c JB |
256 | %attr(755,root,root) %{_sbindir}/wpa_cli |
257 | %attr(755,root,root) %{_sbindir}/wpa_passphrase | |
258 | %attr(755,root,root) %{_sbindir}/wpa_supplicant | |
9d11e01d | 259 | %attr(750,root,root) %ghost %dir /var/run/%{name} |
f66a8987 | 260 | %{systemdtmpfilesdir}/%{name}.conf |
41537a2c | 261 | %{_mandir}/man5/wpa_supplicant.conf.5* |
bb5696df | 262 | %{_mandir}/man8/eapol_test.8* |
41537a2c JB |
263 | %{_mandir}/man8/wpa_background.8* |
264 | %{_mandir}/man8/wpa_cli.8* | |
265 | %{_mandir}/man8/wpa_passphrase.8* | |
266 | %{_mandir}/man8/wpa_supplicant.8* | |
19aba961 | 267 | %if %{with dbus} |
4ea51389 | 268 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/wpa_supplicant.conf |
f1257d27 | 269 | %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service |
f66a8987 | 270 | %{systemdunitdir}/%{name}.service |
19aba961 | 271 | %endif |
df27e1a5 | 272 | |
bed81893 | 273 | %if %{with gui} |
df27e1a5 PG |
274 | %files -n wpa_gui |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) %{_bindir}/wpa_gui | |
41537a2c | 277 | %{_mandir}/man8/wpa_gui.8* |
486800af | 278 | %{_desktopdir}/wpa_gui.desktop |
bed81893 | 279 | %endif |
4771e8c9 MB |
280 | |
281 | %files -n libeap | |
282 | %defattr(644,root,root,755) | |
283 | %attr(755,root,root) %{_libdir}/libeap.so.*.*.* | |
41537a2c | 284 | %attr(755,root,root) %ghost %{_libdir}/libeap.so.0 |
4771e8c9 MB |
285 | |
286 | %files -n libeap-devel | |
287 | %defattr(644,root,root,755) | |
288 | %attr(755,root,root) %{_libdir}/libeap.so | |
289 | %{_includedir}/eap_peer | |
290 | %{_pkgconfigdir}/libeap0.pc |