# TODO:
-# - wpa_gui can be build with qt4 - bcond?
-# - tls extension is in sources - maybe to use it?
+# - wpa_gui can be built with qt4 - bcond?
# - icon for wpa_gui
+# - reverse madwifi bcond when appropriate packages will be available on ftp
#
# Conditional build
-%bcond_with madwifi # with madwifi support (enable it by default
- # if madwifi will be on ftp...)
+%bcond_with madwifi # with madwifi support
%bcond_without gui # don't build gui
#
# sync archlist with madwifi.spec
Summary(pl): Suplikant WPA/WPA2/RSN/IEEE 802.1X dla Linuksa
Name: wpa_supplicant
Version: 0.5.2
-Release: 1
+Release: 2
License: GPL v2
-Group: Networking
+Group: Networking
Source0: http://hostap.epitest.fi/releases/%{name}-%{version}.tar.gz
# Source0-md5: a73b5b1be3f20f3e2c4d325f0a7a38e4
Source1: %{name}.config
Source2: %{name}-wpa_gui.desktop
+Source3: %{name}.init
+Source4: %{name}.sysconfig
Patch0: %{name}-makefile.patch
Patch1: %{name}-0.4.7_dscape-02.patch
URL: http://hostap.epitest.fi/wpa_supplicant/
BuildRequires: qt-devel
%endif
BuildRequires: readline-devel
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-wpa_supplicant is a WPA Supplicant with support for WPA and WPA2
-(IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component
-that is used in the client stations. It implements key negotiation
-with a WPA Authenticator and it controls the roaming and IEEE 802.11
+wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
+802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is
+used in the client stations. It implements key negotiation with a WPA
+Authenticator and it controls the roaming and IEEE 802.11
authentication/association of the wlan driver.
wpa_supplicant is designed to be a "daemon" program that runs in the
- WPA-PSK ("WPA-Personal")
- WPA z EAP (np. z serwerem uwierzytleniaj±cym RADIUS)
("WPA-Enterprise") (aktualnie EAP-TLS i EAP-PEAP/MSCHAPv2 s±
- obs³ugiwane przez za³±czonego suplikanta IEEE 802.1X; inne rodzaje
- EAP mog± byæ u¿ywane przez zewnêtrzny program - Xsupplicant)
+ obs³ugiwane przez za³±czonego suplikanta IEEE 802.1X; inne rodzaje EAP
+ mog± byæ u¿ywane przez zewnêtrzny program - Xsupplicant)
- zarz±dzanie kluczy dla CCMP, TKIP, WEP104, WEP40
- RSN/WPA2 (IEEE 802.11i)
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_desktopdir},/var/run/%{name}}
+install -d $RPM_BUILD_ROOT{%{_mandir}/man{5,8},%{_bindir},%{_desktopdir},/var/run/%{name}} \
+ $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install doc/docbook/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
install doc/docbook/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
%if %{with gui}
-install wpa_gui/wpa_gui $RPM_BUILD_ROOT%{_bindir}
+install wpa_gui/wpa_gui $RPM_BUILD_ROOT%{_bindir}
install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/wpa_gui.desktop
%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+/sbin/chkconfig --add %{name}
+
+%preun
+if [ "$1" = "0" ]; then
+ %service %{name} stop
+ /sbin/chkconfig --del %{name}
+fi
+
%files
%defattr(644,root,root,755)
%doc ChangeLog README eap_testing.txt todo.txt
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%attr(755,root,root) %{_sbindir}/*
%attr(750,root,root) %dir /var/run/%{name}
%{_mandir}/man[58]/*