]> git.pld-linux.org Git - packages/wpa_supplicant.git/blob - wpa_supplicant.spec
- remove fedora openssl BS from config
[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.9
15 Release:        3
16 License:        BSD
17 Group:          Networking
18 Source0:        http://w1.fi/releases/%{name}-%{version}.tar.gz
19 # Source0-md5:  2d2958c782576dc9901092fbfecb4190
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}-gui-qt4.patch
27 # http://www.linuxwimax.org/Download
28 Patch3:         %{name}-0.7.2-generate-libeap-peer.patch
29 Patch4:         dbus-services.patch
30 URL:            http://w1.fi/wpa_supplicant/
31 %{?with_dbus:BuildRequires:     dbus-devel}
32 BuildRequires:  libnl-devel >= 1:3.5
33 BuildRequires:  ncurses-devel
34 BuildRequires:  openssl-devel
35 %{?with_pcsc:BuildRequires:     pcsc-lite-devel}
36 BuildRequires:  pkgconfig
37 BuildRequires:  rpmbuild(macros) >= 1.647
38 %if %{with gui}
39 %if %{with qt5}
40 BuildRequires:  Qt5Gui-devel >= 5
41 BuildRequires:  Qt5Widgets-devel >= 5
42 BuildRequires:  qt5-build >= 5
43 BuildRequires:  qt5-linguist >= 5.13.0-3
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
51 %endif
52 BuildRequires:  readline-devel
53 BuildRequires:  sed >= 4.0
54 Requires:       rc-scripts >= 0.4.1.24
55 Requires:       systemd-units >= 38
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 -n wpa_gui
104 Summary:        Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI
105 Summary(pl.UTF-8):      Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
106 Group:          X11/Applications/Networking
107 Requires:       %{name} = %{version}-%{release}
108
109 %description -n wpa_gui
110 Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI.
111
112 %description -n wpa_gui -l pl.UTF-8
113 Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa.
114
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
138 %prep
139 %setup -q
140 %patch0 -p1
141 %patch1 -p1
142 %patch2 -p1
143 %patch3 -p1
144 %patch4 -p1
145
146 %{__sed} -i -e 's,@LIB@,%{_lib},' src/eap_peer/libeap0.pc
147
148 cp -p %{SOURCE1} wpa_supplicant/.config
149
150 %if %{with dbus}
151 echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config
152 echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config
153 echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config
154 %endif
155
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
163 %build
164 %{__make} -C wpa_supplicant \
165         V=1 \
166         CC="%{__cc}" \
167         BINDIR="%{_sbindir}" \
168         LDFLAGS="%{rpmldflags}" \
169         OPTCFLAGS="%{rpmcppflags} %{rpmcflags}"
170
171 # eapol_test:
172 %{__make} -C wpa_supplicant eapol_test \
173         V=1 \
174         CC="%{__cc}" \
175         LDFLAGS="%{rpmldflags}" \
176         OPTCFLAGS="%{rpmcppflags} %{rpmcflags}"
177
178 %if %{with gui}
179 cd wpa_supplicant/wpa_gui-qt4
180 qmake-qt%{qtver} -o Makefile wpa_gui.pro \
181         QMAKE_CXX="%{__cxx}" \
182         QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
183         QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
184 cd ../..
185 %{__make} -C wpa_supplicant wpa_gui-qt4 \
186         V=1 \
187         QTDIR=%{_libdir}/qt%{qtver} \
188         QMAKE='qmake-qt%{qtver}' \
189         LRELEASE='%{_libdir}/qt%{qtver}/bin/lrelease' \
190         UIC=%{_bindir}/uic-qt%{qtver}
191 %endif
192
193 %{__make} -C src/eap_peer clean
194 %{__make} -C src/eap_peer \
195         CC="%{__cc}" \
196         CFLAGS="%{rpmcppflags} %{rpmcflags} -MMD -Wall $(pkg-config --cflags libnl-3.0) -DTLS_DEFAULT_CIPHERS=\\\"PROFILE=SYSTEM:3DES\\\"" \
197         LDFLAGS="%{rpmldflags} -shared"
198
199 %install
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_sbindir},%{_desktopdir},/var/run/%{name},%{_sysconfdir}} \
202         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}}
203
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}
207
208 cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}
209
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
212
213 # program exists with CONFIG_PRIVSEP only
214 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/wpa_priv.8
215
216 %if %{with dbus}
217 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services}
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
220 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
221 %endif
222
223 %if %{with gui}
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
226 %endif
227
228 install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir}
229 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
230
231 %{__make} -C src/eap_peer install \
232         DESTDIR=$RPM_BUILD_ROOT \
233         LIBDIR=%{_libdir}
234
235 %clean
236 rm -rf $RPM_BUILD_ROOT
237
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
248 %post   -n libeap -p /sbin/ldconfig
249 %postun -n libeap -p /sbin/ldconfig
250
251 %files
252 %defattr(644,root,root,755)
253 %doc COPYING wpa_supplicant/{ChangeLog,README,README-{HS20,P2P,WPS},eap_testing.txt,todo.txt,*wpa_supplicant.conf,examples}
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
255 %attr(755,root,root) %{_bindir}/eapol_test
256 %attr(755,root,root) %{_sbindir}/wpa_cli
257 %attr(755,root,root) %{_sbindir}/wpa_passphrase
258 %attr(755,root,root) %{_sbindir}/wpa_supplicant
259 %attr(750,root,root) %ghost %dir /var/run/%{name}
260 %{systemdtmpfilesdir}/%{name}.conf
261 %{_mandir}/man5/wpa_supplicant.conf.5*
262 %{_mandir}/man8/eapol_test.8*
263 %{_mandir}/man8/wpa_background.8*
264 %{_mandir}/man8/wpa_cli.8*
265 %{_mandir}/man8/wpa_passphrase.8*
266 %{_mandir}/man8/wpa_supplicant.8*
267 %if %{with dbus}
268 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/wpa_supplicant.conf
269 %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
270 %{systemdunitdir}/%{name}.service
271 %endif
272
273 %if %{with gui}
274 %files -n wpa_gui
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_bindir}/wpa_gui
277 %{_mandir}/man8/wpa_gui.8*
278 %{_desktopdir}/wpa_gui.desktop
279 %endif
280
281 %files -n libeap
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/libeap.so.*.*.*
284 %attr(755,root,root) %ghost %{_libdir}/libeap.so.0
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
This page took 0.174709 seconds and 3 git commands to generate.