]> git.pld-linux.org Git - packages/wpa_supplicant.git/blame - wpa_supplicant.spec
- -utils Group
[packages/wpa_supplicant.git] / wpa_supplicant.spec
CommitLineData
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 11Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant
47cec9ef 12Summary(pl.UTF-8): Suplikant WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
bde40618 13Name: wpa_supplicant
5357058f 14Version: 2.10
d86fc90d 15Release: 2
465476b1 16License: BSD
bdc271c3 17Group: Networking
b08e6453 18Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz
5357058f 19# Source0-md5: d26797fcb002898d4ee989179346e1cc
bde40618 20Source1: %{name}.config
486800af 21Source2: %{name}-wpa_gui.desktop
29638b4d 22Source3: %{name}.tmpfiles
f66a8987 23Source4: %{name}.service
bde40618 24Patch0: %{name}-makefile.patch
5357058f 25Patch1: %{name}-gui-qt4.patch
4771e8c9 26# http://www.linuxwimax.org/Download
5357058f
JB
27Patch2: %{name}-0.7.2-generate-libeap-peer.patch
28Patch3: dbus-services.patch
b08e6453 29URL: http://w1.fi/wpa_supplicant/
19aba961 30%{?with_dbus:BuildRequires: dbus-devel}
d8a4d054 31BuildRequires: libnl-devel >= 1:3.5
2af19e57 32BuildRequires: ncurses-devel
bde40618 33BuildRequires: openssl-devel
465476b1 34%{?with_pcsc:BuildRequires: pcsc-lite-devel}
8f834f15 35BuildRequires: pkgconfig
c299b6ab 36BuildRequires: rpmbuild(macros) >= 1.647
bed81893 37%if %{with gui}
465476b1
JB
38%if %{with qt5}
39BuildRequires: Qt5Gui-devel >= 5
40BuildRequires: Qt5Widgets-devel >= 5
41BuildRequires: qt5-build >= 5
867e45e1 42BuildRequires: qt5-linguist >= 5.13.0-3
465476b1
JB
43BuildRequires: qt5-qmake >= 5
44%else
45BuildRequires: QtGui-devel >= 4
46BuildRequires: qt4-build >= 4
47BuildRequires: qt4-linguist >= 4
48BuildRequires: qt4-qmake >= 4
49%endif
bed81893 50%endif
bde40618 51BuildRequires: readline-devel
53789b76 52BuildRequires: sed >= 4.0
f85cfd26 53Requires: rc-scripts >= 0.4.1.24
f66a8987 54Requires: systemd-units >= 38
d86fc90d 55Suggests: %{name}-utils = %{version}-%{release}
bde40618 56BuildRoot: %{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
61wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
62802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is
63used in the client stations. It implements key negotiation with a WPA
64Authenticator and it controls the roaming and IEEE 802.11
bde40618 65authentication/association of the wlan driver.
66
855d62cf 67wpa_supplicant is designed to be a "daemon" program that runs in the
68background and acts as the backend component controlling the wireless
69connection. Support for separate frontend programs is included and an
70example text-based frontend, wpa_cli, is included with wpa_supplicant.
71
72Supported 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
82wpa_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
84klienckich. Implementuje negocjację kluczy z elementem
85uwierzytelniającym WPA (WPA Authenticator) i kontroluje roaming oraz
90dcf215
JB
86uwierzytelnianie/kojarzenie sterownika wlan zgodnie z IEEE 802.11.
87
6c208807
JR
88wpa_supplicant jest zaprojektowany tak, by był wspólnym programem
89działającym w tle i działa jako element backendu sterujący połączeniem
90bezprzewodowym. Dostępna jest obsługa oddzielnych programów
91frontendowych, a w pakiecie wpa_supplicant załączony jest prosty
90dcf215
JB
92frontend tekstowy - wpa_cli.
93
6c208807 94Obsł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
104Summary: wpa_supplicant utilities
105Summary(pl.UTF-8): Narzędzia dla wpa_supplicant
b4a6dd4d 106Group: Networking
d86fc90d
JP
107
108%description utils
109wpa_supplicant utilities.
110
111%description utils -l pl.UTF-8
112Narzędzia dla wpa_supplicant.
113
df27e1a5
PG
114%package -n wpa_gui
115Summary: Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI
47cec9ef 116Summary(pl.UTF-8): Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
df27e1a5 117Group: X11/Applications/Networking
65b10057 118Requires(post,postun): desktop-file-utils
fcaa0e79 119Requires: %{name} = %{version}-%{release}
df27e1a5
PG
120
121%description -n wpa_gui
fcaa0e79
JB
122Linux WPA/WPA2/RSN/IEEE 802.1X supplicant GUI.
123
6c208807 124%description -n wpa_gui -l pl.UTF-8
fcaa0e79 125Graficzny interfejs suplikanta WPA/WPA2/RSN/IEEE 802.1X dla Linuksa.
df27e1a5 126
4771e8c9
MB
127%package -n libeap
128Summary: EAP Peer library
129Summary(pl.UTF-8): Biblioteka EAP Peer
130Group: Libraries
131
132%description -n libeap
133EAP Peer library.
134
135%description -n libeap -l pl.UTF-8
136Biblioteka EAP Peer.
137
138%package -n libeap-devel
139Summary: Development files for eap library
140Summary(pl.UTF-8): Pliki programistyczne dla biblioteki eap
141Group: Development/Libraries
142Requires: libeap = %{version}-%{release}
143
144%description -n libeap-devel
145Development files for eap library.
146
147%description -n libeap-devel -l pl.UTF-8
148Pliki 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 159cp -p %{SOURCE1} wpa_supplicant/.config
bde40618 160
19aba961
MB
161%if %{with dbus}
162echo 'CONFIG_CTRL_IFACE_DBUS=y' >> wpa_supplicant/.config
f1257d27
MB
163echo 'CONFIG_CTRL_IFACE_DBUS_NEW=y' >> wpa_supplicant/.config
164echo 'CONFIG_CTRL_IFACE_DBUS_INTRO=y' >> wpa_supplicant/.config
19aba961
MB
165%endif
166
465476b1
JB
167%if %{with pcsc}
168echo 'CONFIG_PCSC=y' >> wpa_supplicant/.config
169echo 'CONFIG_EAP_SIM=y' >> wpa_supplicant/.config
170echo 'CONFIG_EAP_AKA=y' >> wpa_supplicant/.config
171echo 'CONFIG_EAP_AKA_PRIME=y' >> wpa_supplicant/.config
172%endif
173
bde40618 174%build
5357058f 175CFLAGS="%{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 183CFLAGS="%{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 190cd wpa_supplicant/wpa_gui-qt4
465476b1 191qmake-qt%{qtver} -o Makefile wpa_gui.pro \
de1f0e4e
JB
192 QMAKE_CXX="%{__cxx}" \
193 QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
194 QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
b194f08b 195cd ../..
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
211rm -rf $RPM_BUILD_ROOT
29638b4d 212install -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 215install -p wpa_supplicant/wpa_cli $RPM_BUILD_ROOT%{_sbindir}
61cc9b2e 216install -p wpa_supplicant/wpa_passphrase $RPM_BUILD_ROOT%{_bindir}
43e2545a 217install -p wpa_supplicant/wpa_supplicant $RPM_BUILD_ROOT%{_sbindir}
4771e8c9 218
43e2545a 219cp -p wpa_supplicant/wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}
bde40618 220
43e2545a
ER
221cp -p wpa_supplicant/doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
222cp -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}
229install -d $RPM_BUILD_ROOT{%{_sysconfdir}/dbus-1/system.d,%{_datadir}/dbus-1/system-services}
43e2545a
ER
230cp -p wpa_supplicant/dbus/dbus-wpa_supplicant.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
231cp -p wpa_supplicant/dbus/*.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services
f66a8987 232cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
19aba961
MB
233%endif
234
bed81893 235%if %{with gui}
43e2545a
ER
236install -p wpa_supplicant/wpa_gui-qt4/wpa_gui $RPM_BUILD_ROOT%{_bindir}
237cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop
bed81893 238%endif
df27e1a5 239
43e2545a
ER
240install -p wpa_supplicant/eapol_test $RPM_BUILD_ROOT%{_bindir}
241cp -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
248rm -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
This page took 0.161807 seconds and 4 git commands to generate.