]> git.pld-linux.org Git - packages/wpa_supplicant.git/blob - wpa_supplicant.spec
a6eb6a230a1e3ab3f4e7302f65ef43ecf29e4dbb
[packages/wpa_supplicant.git] / wpa_supplicant.spec
1 # TODO:
2 # - consider using CONFIG_PRIVSEP
3 # - icon for wpa_gui
4 #
5 # Conditional build
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
9 %bcond_with     qt5             # use Qt 5 instead of Qt 4
10
11 Summary:        Linux WPA/WPA2/RSN/IEEE 802.1X supplicant
12 Summary(pl.UTF-8):      Suplikant WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
13 Name:           wpa_supplicant
14 Version:        2.6
15 Release:        2
16 License:        BSD
17 Group:          Networking
18 Source0:        http://w1.fi/releases/%{name}-%{version}.tar.gz
19 # Source0-md5:  091569eb4440b7d7f2b4276dbfc03c3c
20 Source1:        %{name}.config
21 Source2:        %{name}-wpa_gui.desktop
22 Source3:        %{name}.tmpfiles
23 Source4:        %{name}.service
24 Patch0:         %{name}-makefile.patch
25 Patch1:         %{name}-OPTCFLAGS.patch
26 Patch2:         %{name}-lrelease.patch
27 # http://www.linuxwimax.org/Download
28 Patch3:         %{name}-0.7.2-generate-libeap-peer.patch
29 Patch4:         dbus-services.patch
30 Patch5:         0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
31 Patch6:         0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
32 Patch7:         0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
33 Patch8:         0004-Prevent-installation-of-an-all-zero-TK.patch
34 Patch9:         0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
35 Patch10:        0006-TDLS-Reject-TPK-TK-reconfiguration.patch
36 Patch11:        0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
37 Patch12:        0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
38 URL:            http://w1.fi/wpa_supplicant/
39 %{?with_dbus:BuildRequires:     dbus-devel}
40 BuildRequires:  libnl-devel >= 1:3.2
41 BuildRequires:  ncurses-devel
42 BuildRequires:  openssl-devel
43 %{?with_pcsc:BuildRequires:     pcsc-lite-devel}
44 BuildRequires:  pkgconfig
45 BuildRequires:  rpmbuild(macros) >= 1.647
46 %if %{with gui}
47 %if %{with qt5}
48 BuildRequires:  Qt5Gui-devel >= 5
49 BuildRequires:  Qt5Widgets-devel >= 5
50 BuildRequires:  qt5-build >= 5
51 BuildRequires:  qt5-linguist >= 5
52 BuildRequires:  qt5-qmake >= 5
53 %else
54 BuildRequires:  QtGui-devel >= 4
55 BuildRequires:  qt4-build >= 4
56 BuildRequires:  qt4-linguist >= 4
57 BuildRequires:  qt4-qmake >= 4
58 %endif
59 %endif
60 BuildRequires:  readline-devel
61 BuildRequires:  sed >= 4.0
62 Requires:       rc-scripts >= 0.4.1.24
63 Requires:       systemd-units >= 38
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %define         qtver   %{?with_qt5:5}%{!?with_qt5:4}
67
68 %description
69 wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
70 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is
71 used in the client stations. It implements key negotiation with a WPA
72 Authenticator and it controls the roaming and IEEE 802.11
73 authentication/association of the wlan driver.
74
75 wpa_supplicant is designed to be a "daemon" program that runs in the
76 background and acts as the backend component controlling the wireless
77 connection. Support for separate frontend programs is included and an
78 example text-based frontend, wpa_cli, is included with wpa_supplicant.
79
80 Supported WPA/IEEE 802.11i features:
81 - WPA-PSK ("WPA-Personal")
82 - WPA with EAP (e.g., with RADIUS authentication server)
83   ("WPA-Enterprise") (currently, EAP-TLS and EAP-PEAP/MSCHAPv2 are
84   supported with an integrated IEEE 802.1X Supplicant; other EAP types
85   may be used with an external program, Xsupplicant)
86 - key management for CCMP, TKIP, WEP104, WEP40
87 - RSN/WPA2 (IEEE 802.11i)
88
89 %description -l pl.UTF-8
90 wpa_supplicant to suplikant WPA z obsługą WPA oraz WPA2 (IEEE 802.11i
91 / RSN). Suplikant to element IEEE 802.1X/WPA używany na stacjach
92 klienckich. Implementuje negocjację kluczy z elementem
93 uwierzytelniającym WPA (WPA Authenticator) i kontroluje roaming oraz
94 uwierzytelnianie/kojarzenie sterownika wlan zgodnie z IEEE 802.11.
95
96 wpa_supplicant jest zaprojektowany tak, by był wspólnym programem
97 działającym w tle i działa jako element backendu sterujący połączeniem
98 bezprzewodowym. Dostępna jest obsługa oddzielnych programów
99 frontendowych, a w pakiecie wpa_supplicant załączony jest prosty
100 frontend tekstowy - wpa_cli.
101
102 Obsługiwane możliwości WPA/IEEE 802.11i:
103 - WPA-PSK ("WPA-Personal")
104 - WPA z EAP (np. z serwerem uwierzytleniającym RADIUS)
105   ("WPA-Enterprise") (aktualnie EAP-TLS i EAP-PEAP/MSCHAPv2 są
106   obsługiwane przez załączonego suplikanta IEEE 802.1X; inne rodzaje EAP
107   mogą być używane przez zewnętrzny program - Xsupplicant)
108 - zarządzanie kluczy dla CCMP, TKIP, WEP104, WEP40
109 - RSN/WPA2 (IEEE 802.11i)
110
111 %package -n wpa_gui
112 Summary:        Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI
113 Summary(pl.UTF-8):      Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
114 Group:          X11/Applications/Networking
115 Requires:       %{name} = %{version}-%{release}
116
117 %description -n wpa_gui
118 Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI.
119
120 %description -n wpa_gui -l pl.UTF-8
121 Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa.
122
123 %package -n libeap
124 Summary:        EAP Peer library
125 Summary(pl.UTF-8):      Biblioteka EAP Peer
126 Group:          Libraries
127
128 %description -n libeap
129 EAP Peer library.
130
131 %description -n libeap -l pl.UTF-8
132 Biblioteka EAP Peer.
133
134 %package -n libeap-devel
135 Summary:        Development files for eap library
136 Summary(pl.UTF-8):      Pliki programistyczne dla biblioteki eap
137 Group:          Development/Libraries
138 Requires:       libeap = %{version}-%{release}
139
140 %description -n libeap-devel
141 Development files for eap library.
142
143 %description -n libeap-devel -l pl.UTF-8
144 Pliki programistyczne dla biblioteki eap.
145
146 %prep
147 %setup -q
148 %patch0 -p1
149 %patch1 -p1
150 %patch2 -p0
151 %patch3 -p1
152 %patch4 -p1
153 %patch5 -p1
154 %patch6 -p1
155 %patch7 -p1
156 %patch8 -p1
157 %patch9 -p1
158 %patch10 -p1
159 %patch11 -p1
160
161 %{__sed} -i -e 's,@LIB@,%{_lib},' src/eap_peer/libeap0.pc
162
163 cp -p %{SOURCE1} wpa_supplicant/.config
164
165 %if %{with dbus}
166 echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config
167 echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config
168 echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config
169 %endif
170
171 %if %{with pcsc}
172 echo 'CONFIG_PCSC=y' >> wpa_supplicant/.config
173 echo 'CONFIG_EAP_SIM=y' >> wpa_supplicant/.config
174 echo 'CONFIG_EAP_AKA=y' >> wpa_supplicant/.config
175 echo 'CONFIG_EAP_AKA_PRIME=y' >> wpa_supplicant/.config
176 %endif
177
178 %build
179 %{__make} -C wpa_supplicant \
180         V=1 \
181         CC="%{__cc}" \
182         BINDIR="%{_sbindir}" \
183         LDFLAGS="%{rpmldflags}" \
184         OPTCFLAGS="%{rpmcppflags} %{rpmcflags}"
185
186 # eapol_test:
187 %{__make} -C wpa_supplicant eapol_test \
188         V=1 \
189         CC="%{__cc}" \
190         LDFLAGS="%{rpmldflags}" \
191         OPTCFLAGS="%{rpmcppflags} %{rpmcflags}"
192
193 %if %{with gui}
194 cd wpa_supplicant/wpa_gui-qt4
195 qmake-qt%{qtver} -o Makefile wpa_gui.pro \
196         QMAKE_CXX="%{__cxx}" \
197         QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
198         QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
199 cd ../..
200 %{__make} -C wpa_supplicant wpa_gui-qt4 \
201         V=1 \
202         QTDIR=%{_libdir}/qt%{qtver} \
203         UIC=%{_bindir}/uic-qt%{qtver}
204 %endif
205
206 %{__make} -C src/eap_peer clean
207 %{__make} -C src/eap_peer \
208         CC="%{__cc}" \
209         CFLAGS="%{rpmcppflags} %{rpmcflags} -MMD -Wall $(pkg-config --cflags libnl-3.0)" \
210         LDFLAGS="%{rpmldflags} -shared"
211
212 %install
213 rm -rf $RPM_BUILD_ROOT
214 install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_sbindir},%{_desktopdir},/var/run/%{name},%{_sysconfdir}} \
215         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}}
216
217 install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir}
218 install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_sbindir}
219 install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir}
220
221 cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}
222
223 cp -p wpa_supplicant/doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
224 cp -p wpa_supplicant/doc/docbook/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
225
226 # program exists with CONFIG_PRIVSEP only
227 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_priv.8
228
229 %if %{with dbus}
230 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services}
231 cp -p wpa_supplicant/dbus/dbus-wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
232 cp -p wpa_supplicant/dbus/*.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services
233 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
234 %endif
235
236 %if %{with gui}
237 install -p wpa_supplicant/wpa_gui-qt4/wpa_gui $RPM_BUILD_ROOT%{_bindir}
238 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop
239 %endif
240
241 install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir}
242 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
243
244 %{__make} -C src/eap_peer install \
245         DESTDIR=$RPM_BUILD_ROOT \
246         LIBDIR=%{_libdir}
247
248 %clean
249 rm -rf $RPM_BUILD_ROOT
250
251 %post
252 %systemd_reload
253 %systemd_service_restart wpa_supplicant.service
254
255 %preun
256 %systemd_preun wpa_supplicant.service
257
258 %postun
259 %systemd_reload
260
261 %post   -n libeap -p /sbin/ldconfig
262 %postun -n libeap -p /sbin/ldconfig
263
264 %files
265 %defattr(644,root,root,755)
266 %doc COPYING wpa_supplicant/{ChangeLog,README,README-{HS20,P2P,WPS},eap_testing.txt,todo.txt,*wpa_supplicant.conf,examples}
267 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
268 %attr(755,root,root) %{_bindir}/eapol_test
269 %attr(755,root,root) %{_sbindir}/wpa_cli
270 %attr(755,root,root) %{_sbindir}/wpa_passphrase
271 %attr(755,root,root) %{_sbindir}/wpa_supplicant
272 %attr(750,root,root) %ghost %dir /var/run/%{name}
273 %{systemdtmpfilesdir}/%{name}.conf
274 %{_mandir}/man5/wpa_supplicant.conf.5*
275 %{_mandir}/man8/eapol_test.8*
276 %{_mandir}/man8/wpa_background.8*
277 %{_mandir}/man8/wpa_cli.8*
278 %{_mandir}/man8/wpa_passphrase.8*
279 %{_mandir}/man8/wpa_supplicant.8*
280 %if %{with dbus}
281 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/wpa_supplicant.conf
282 %{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
283 %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
284 %{systemdunitdir}/%{name}.service
285 %endif
286
287 %if %{with gui}
288 %files -n wpa_gui
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/wpa_gui
291 %{_mandir}/man8/wpa_gui.8*
292 %{_desktopdir}/wpa_gui.desktop
293 %endif
294
295 %files -n libeap
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_libdir}/libeap.so.*.*.*
298 %attr(755,root,root) %ghost %{_libdir}/libeap.so.0
299
300 %files -n libeap-devel
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_libdir}/libeap.so
303 %{_includedir}/eap_peer
304 %{_pkgconfigdir}/libeap0.pc
This page took 0.095706 seconds and 2 git commands to generate.