]> git.pld-linux.org Git - packages/wpa_supplicant.git/blob - wpa_supplicant.spec
- -utils Group
[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_without  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.10
15 Release:        2
16 License:        BSD
17 Group:          Networking
18 Source0:        http://w1.fi/releases/%{name}-%{version}.tar.gz
19 # Source0-md5:  d26797fcb002898d4ee989179346e1cc
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}-gui-qt4.patch
26 # http://www.linuxwimax.org/Download
27 Patch2:         %{name}-0.7.2-generate-libeap-peer.patch
28 Patch3:         dbus-services.patch
29 URL:            http://w1.fi/wpa_supplicant/
30 %{?with_dbus:BuildRequires:     dbus-devel}
31 BuildRequires:  libnl-devel >= 1:3.5
32 BuildRequires:  ncurses-devel
33 BuildRequires:  openssl-devel
34 %{?with_pcsc:BuildRequires:     pcsc-lite-devel}
35 BuildRequires:  pkgconfig
36 BuildRequires:  rpmbuild(macros) >= 1.647
37 %if %{with gui}
38 %if %{with qt5}
39 BuildRequires:  Qt5Gui-devel >= 5
40 BuildRequires:  Qt5Widgets-devel >= 5
41 BuildRequires:  qt5-build >= 5
42 BuildRequires:  qt5-linguist >= 5.13.0-3
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
50 %endif
51 BuildRequires:  readline-devel
52 BuildRequires:  sed >= 4.0
53 Requires:       rc-scripts >= 0.4.1.24
54 Requires:       systemd-units >= 38
55 Suggests:       %{name}-utils = %{version}-%{release}
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         qtver   %{?with_qt5:5}%{!?with_qt5:4}
59
60 %description
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
65 authentication/association of the wlan driver.
66
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")
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)
78 - key management for CCMP, TKIP, WEP104, WEP40
79 - RSN/WPA2 (IEEE 802.11i)
80
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
86 uwierzytelnianie/kojarzenie sterownika wlan zgodnie z IEEE 802.11.
87
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
92 frontend tekstowy - wpa_cli.
93
94 Obsługiwane możliwości WPA/IEEE 802.11i:
95 - WPA-PSK ("WPA-Personal")
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
101 - RSN/WPA2 (IEEE 802.11i)
102
103 %package utils
104 Summary:        wpa_supplicant utilities
105 Summary(pl.UTF-8):      Narzędzia dla wpa_supplicant
106 Group:          Networking
107
108 %description utils
109 wpa_supplicant utilities.
110
111 %description utils -l pl.UTF-8
112 Narzędzia dla wpa_supplicant.
113
114 %package -n wpa_gui
115 Summary:        Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI
116 Summary(pl.UTF-8):      Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
117 Group:          X11/Applications/Networking
118 Requires(post,postun):  desktop-file-utils
119 Requires:       %{name} = %{version}-%{release}
120
121 %description -n wpa_gui
122 Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI.
123
124 %description -n wpa_gui -l pl.UTF-8
125 Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa.
126
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
150 %prep
151 %setup -q
152 %patch0 -p1
153 %patch1 -p1
154 %patch2 -p1
155 %patch3 -p1
156
157 %{__sed} -i -e 's,@LIB@,%{_lib},' src/eap_peer/libeap0.pc
158
159 cp -p %{SOURCE1} wpa_supplicant/.config
160
161 %if %{with dbus}
162 echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config
163 echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config
164 echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config
165 %endif
166
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
174 %build
175 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
176 %{__make} -C wpa_supplicant \
177         V=1 \
178         CC="%{__cc}" \
179         BINDIR="%{_sbindir}" \
180         LDFLAGS="%{rpmldflags}"
181
182 # eapol_test:
183 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
184 %{__make} -C wpa_supplicant eapol_test \
185         V=1 \
186         CC="%{__cc}" \
187         LDFLAGS="%{rpmldflags}"
188
189 %if %{with gui}
190 cd wpa_supplicant/wpa_gui-qt4
191 qmake-qt%{qtver} -o Makefile wpa_gui.pro \
192         QMAKE_CXX="%{__cxx}" \
193         QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
194         QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
195 cd ../..
196 %{__make} -C wpa_supplicant wpa_gui-qt4 \
197         V=1 \
198         QTDIR=%{_libdir}/qt%{qtver} \
199         QMAKE='qmake-qt%{qtver}' \
200         LRELEASE='%{_libdir}/qt%{qtver}/bin/lrelease' \
201         UIC=%{_bindir}/uic-qt%{qtver}
202 %endif
203
204 %{__make} -C src/eap_peer -f Makefile.libeap clean
205 %{__make} -C src/eap_peer -f Makefile.libeap \
206         CC="%{__cc}" \
207         CFLAGS="%{rpmcppflags} %{rpmcflags} -MMD -Wall $(pkg-config --cflags libnl-3.0) -DTLS_DEFAULT_CIPHERS=\\\"PROFILE=SYSTEM:3DES\\\"" \
208         LDFLAGS="%{rpmldflags} -shared"
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_sbindir},%{_desktopdir},/var/run/%{name},%{_sysconfdir}} \
213         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}}
214
215 install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir}
216 install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_bindir}
217 install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir}
218
219 cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}
220
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
223
224 %{!?with_gui:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_gui.8}
225 # program exists with CONFIG_PRIVSEP only
226 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_priv.8
227
228 %if %{with dbus}
229 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services}
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
232 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
233 %endif
234
235 %if %{with gui}
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
238 %endif
239
240 install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir}
241 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
242
243 %{__make} -C src/eap_peer -f Makefile.libeap install \
244         DESTDIR=$RPM_BUILD_ROOT \
245         LIBDIR=%{_libdir}
246
247 %clean
248 rm -rf $RPM_BUILD_ROOT
249
250 %post
251 %systemd_post wpa_supplicant.service
252
253 %preun
254 %systemd_preun wpa_supplicant.service
255
256 %postun
257 %systemd_reload
258
259 %post -n wpa_gui
260 %update_desktop_database_post
261
262 %postun -n wpa_gui
263 %update_desktop_database_postun
264
265 %post   -n libeap -p /sbin/ldconfig
266 %postun -n libeap -p /sbin/ldconfig
267
268 %files
269 %defattr(644,root,root,755)
270 %doc COPYING wpa_supplicant/{ChangeLog,README,README-{HS20,P2P,WPS},eap_testing.txt,todo.txt,*wpa_supplicant.conf,examples}
271 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
272 %attr(755,root,root) %{_bindir}/eapol_test
273 %attr(755,root,root) %{_sbindir}/wpa_cli
274 %attr(755,root,root) %{_sbindir}/wpa_supplicant
275 %attr(750,root,root) %ghost %dir /var/run/%{name}
276 %{systemdtmpfilesdir}/%{name}.conf
277 %{_mandir}/man5/wpa_supplicant.conf.5*
278 %{_mandir}/man8/eapol_test.8*
279 %{_mandir}/man8/wpa_background.8*
280 %{_mandir}/man8/wpa_cli.8*
281 %{_mandir}/man8/wpa_supplicant.8*
282 %if %{with dbus}
283 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/wpa_supplicant.conf
284 %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
285 %{systemdunitdir}/%{name}.service
286 %endif
287
288 %files utils
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/wpa_passphrase
291 %{_mandir}/man8/wpa_passphrase.8*
292
293 %if %{with gui}
294 %files -n wpa_gui
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_bindir}/wpa_gui
297 %{_mandir}/man8/wpa_gui.8*
298 %{_desktopdir}/wpa_gui.desktop
299 %endif
300
301 %files -n libeap
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/libeap.so.*.*.*
304 %attr(755,root,root) %ghost %{_libdir}/libeap.so.0
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
This page took 0.249444 seconds and 4 git commands to generate.