Group :: Security/Networking
RPM: wpa_supplicant
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define madwifi_version 0.9.4
# not yet
%def_disable privsep
Name: wpa_supplicant
Version: 0.6.5
Release: alt1
Summary: wpa_supplicant is an implementation of the WPA Supplicant component
License: GPL/BSD
Group: Security/Networking
Url: http://hostap.epitest.fi/
Source0: %name-%version-%release.tar
Source1: src-%version-%release.tar
PreReq: coreutils
Requires: dbus
BuildPreReq: kernel-build-tools >= 0.7
BuildRequires: kernel-source-madwifi libdbus-devel libnl-devel >= 1.1
BuildRequires: docbook-utils libncurses-devel libpcsclite-devel libreadline-devel libssl-devel
%description
wpa_supplicant is an implementation of the WPA Supplicant component,
i.e., the part that runs in the client stations. It implements WPA key
negotiation with a WPA Authenticator and EAP authentication with
Authentication Server. In addition, 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
background and acts as the backend component controlling the wireless
connection. wpa_supplicant supports separate frontend programs and an
example text-based frontend, wpa_cli, is included with wpa_supplicant.
%prep
%setup -c -a1
sed -i 's,/usr/lib,%_libdir,' wpa_supplicant/wpa_supplicant.conf
sed -i 's,=/sbin/wpa_supplicant,=/usr/sbin/wpa_supplicant,' %name/dbus-wpa_supplicant.service
sed -e '/CONFIG_DRIVER_HOSTAP.\+$/aCONFIG_DRIVER_NL80211=y' \
-e '/CONFIG_DRIVER_HOSTAP.\+$/aCONFIG_CLIENT_MLME=y' \
-e '/CONFIG_DRIVER_HOSTAP.\+$/aCONFIG_DRIVER_PS3=y' \
-e 's,^.\+CONFIG_DRIVER_NDISWRAPPER=.\+,CONFIG_DRIVER_NDISWRAPPER=y,' \
-e 's,^.\+CONFIG_DRIVER_PRISM54=.\+,CONFIG_DRIVER_PRISM54=y,' \
-e 's,^.\+CONFIG_DRIVER_RALINK=.\+,CONFIG_DRIVER_RALINK=y,' \
-e 's,^.\+CONFIG_DRIVER_MADWIFI=.\+,CONFIG_DRIVER_MADWIFI=y,' \
-e 's,^.\+-I../madwifi/wpa,CFLAGS += -I../kernel-source-madwifi-%madwifi_version,' \
-e 's,^.\+CONFIG_CTRL_IFACE_DBUS=.\+,CONFIG_CTRL_IFACE_DBUS=y,' \
-e 's,^.\+CONFIG_READLINE=.\+,CONFIG_READLINE=y,' \
-e 's,^.\+CONFIG_PCSC=.\+,CONFIG_PCSC=y,' \
-e 's,^.\+CONFIG_EAP_SIM=.\+,CONFIG_EAP_SIM=y,' \
-e 's,^.\+CONFIG_EAP_PSK=.\+,CONFIG_EAP_PSK=y,' \
-e 's,^.\+CONFIG_EAP_AKA=.\+,CONFIG_EAP_AKA=y,' \
-e 's,^.\+CONFIG_EAP_SAKE=.\+,CONFIG_EAP_SAKE=y,' \
-e 's,^.\+CONFIG_INTERNAL_LIBTOMMATH_FAST=.\+,CONFIG_INTERNAL_LIBTOMMATH_FAST=y,' \
%if_enabled privsep
-e 's,^.\+CONFIG_PRIVSEP=.\+,CONFIG_PRIVSEP=y,' \
%endif
< %name/defconfig > %name/.config
rm -rf kernel-source-madwifi-%madwifi_version
tar xf %kernel_src/kernel-source-madwifi-%madwifi_version.tar.bz2
%build
make -C %name
make -C %name/doc/docbook man
%install
install -pm0644 -D %name/%name.conf %buildroot%_sysconfdir/wpa_supplicant.conf
install -pm0644 -D %name/%name.sysconfig %buildroot%_sysconfdir/sysconfig/wpa_supplicant
install -pm0755 -D %name/%name.init %buildroot%_initdir/%name
install -pm0755 -D %name/wpa_supplicant %buildroot%_sbindir/wpa_supplicant
install -pm0755 %name/wpa_cli %buildroot%_sbindir
%if_enabled privsep
install -pm0755 %name/wpa_priv %buildroot%_sbindir
%endif
install -pm0755 -D %name/wpa_passphrase %buildroot%_bindir/wpa_passphrase
install -pm0644 -D %name/dbus-wpa_supplicant.conf %buildroot%_sysconfdir/dbus-1/system.d/dbus-%name.conf
install -pm0644 -D %name/dbus-wpa_supplicant.service %buildroot%_datadir/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
install -pm0644 -D %name/doc/docbook/%name.conf.5 %buildroot%_man5dir/%name.conf.5
install -pm0644 -D %name/doc/docbook/%name.8 %buildroot%_man8dir/%name.8
install -pm0644 %name/doc/docbook/wpa_{cli,passphrase,background,priv}.8 %buildroot%_man8dir
%post
%post_service %name
%preun
%preun_service %name
%files
%doc %name/README %name/ChangeLog %name/examples
%_initdir/%name
%config(noreplace) %attr(0600,root,root) %_sysconfdir/wpa_supplicant.conf
%config(noreplace) %_sysconfdir/sysconfig/wpa_supplicant
%config %_sysconfdir/dbus-1/system.d/dbus-%name.conf
%_datadir/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
%if_enabled privsep
%_sbindir/wpa_priv
%endif
%_sbindir/wpa_supplicant
%_sbindir/wpa_cli
%_bindir/wpa_passphrase
%_man5dir/wpa_supplicant.conf.*
%_man8dir/wpa_background.*
%_man8dir/wpa_cli.*
%_man8dir/wpa_supplicant.*
%_man8dir/wpa_passphrase.*
%if_enabled privsep
%_man8dir/wpa_priv.*
%endif
%changelog
…
Full changelog you can see here
# not yet
%def_disable privsep
Name: wpa_supplicant
Version: 0.6.5
Release: alt1
Summary: wpa_supplicant is an implementation of the WPA Supplicant component
License: GPL/BSD
Group: Security/Networking
Url: http://hostap.epitest.fi/
Source0: %name-%version-%release.tar
Source1: src-%version-%release.tar
PreReq: coreutils
Requires: dbus
BuildPreReq: kernel-build-tools >= 0.7
BuildRequires: kernel-source-madwifi libdbus-devel libnl-devel >= 1.1
BuildRequires: docbook-utils libncurses-devel libpcsclite-devel libreadline-devel libssl-devel
%description
wpa_supplicant is an implementation of the WPA Supplicant component,
i.e., the part that runs in the client stations. It implements WPA key
negotiation with a WPA Authenticator and EAP authentication with
Authentication Server. In addition, 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
background and acts as the backend component controlling the wireless
connection. wpa_supplicant supports separate frontend programs and an
example text-based frontend, wpa_cli, is included with wpa_supplicant.
%prep
%setup -c -a1
sed -i 's,/usr/lib,%_libdir,' wpa_supplicant/wpa_supplicant.conf
sed -i 's,=/sbin/wpa_supplicant,=/usr/sbin/wpa_supplicant,' %name/dbus-wpa_supplicant.service
sed -e '/CONFIG_DRIVER_HOSTAP.\+$/aCONFIG_DRIVER_NL80211=y' \
-e '/CONFIG_DRIVER_HOSTAP.\+$/aCONFIG_CLIENT_MLME=y' \
-e '/CONFIG_DRIVER_HOSTAP.\+$/aCONFIG_DRIVER_PS3=y' \
-e 's,^.\+CONFIG_DRIVER_NDISWRAPPER=.\+,CONFIG_DRIVER_NDISWRAPPER=y,' \
-e 's,^.\+CONFIG_DRIVER_PRISM54=.\+,CONFIG_DRIVER_PRISM54=y,' \
-e 's,^.\+CONFIG_DRIVER_RALINK=.\+,CONFIG_DRIVER_RALINK=y,' \
-e 's,^.\+CONFIG_DRIVER_MADWIFI=.\+,CONFIG_DRIVER_MADWIFI=y,' \
-e 's,^.\+-I../madwifi/wpa,CFLAGS += -I../kernel-source-madwifi-%madwifi_version,' \
-e 's,^.\+CONFIG_CTRL_IFACE_DBUS=.\+,CONFIG_CTRL_IFACE_DBUS=y,' \
-e 's,^.\+CONFIG_READLINE=.\+,CONFIG_READLINE=y,' \
-e 's,^.\+CONFIG_PCSC=.\+,CONFIG_PCSC=y,' \
-e 's,^.\+CONFIG_EAP_SIM=.\+,CONFIG_EAP_SIM=y,' \
-e 's,^.\+CONFIG_EAP_PSK=.\+,CONFIG_EAP_PSK=y,' \
-e 's,^.\+CONFIG_EAP_AKA=.\+,CONFIG_EAP_AKA=y,' \
-e 's,^.\+CONFIG_EAP_SAKE=.\+,CONFIG_EAP_SAKE=y,' \
-e 's,^.\+CONFIG_INTERNAL_LIBTOMMATH_FAST=.\+,CONFIG_INTERNAL_LIBTOMMATH_FAST=y,' \
%if_enabled privsep
-e 's,^.\+CONFIG_PRIVSEP=.\+,CONFIG_PRIVSEP=y,' \
%endif
< %name/defconfig > %name/.config
rm -rf kernel-source-madwifi-%madwifi_version
tar xf %kernel_src/kernel-source-madwifi-%madwifi_version.tar.bz2
%build
make -C %name
make -C %name/doc/docbook man
%install
install -pm0644 -D %name/%name.conf %buildroot%_sysconfdir/wpa_supplicant.conf
install -pm0644 -D %name/%name.sysconfig %buildroot%_sysconfdir/sysconfig/wpa_supplicant
install -pm0755 -D %name/%name.init %buildroot%_initdir/%name
install -pm0755 -D %name/wpa_supplicant %buildroot%_sbindir/wpa_supplicant
install -pm0755 %name/wpa_cli %buildroot%_sbindir
%if_enabled privsep
install -pm0755 %name/wpa_priv %buildroot%_sbindir
%endif
install -pm0755 -D %name/wpa_passphrase %buildroot%_bindir/wpa_passphrase
install -pm0644 -D %name/dbus-wpa_supplicant.conf %buildroot%_sysconfdir/dbus-1/system.d/dbus-%name.conf
install -pm0644 -D %name/dbus-wpa_supplicant.service %buildroot%_datadir/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
install -pm0644 -D %name/doc/docbook/%name.conf.5 %buildroot%_man5dir/%name.conf.5
install -pm0644 -D %name/doc/docbook/%name.8 %buildroot%_man8dir/%name.8
install -pm0644 %name/doc/docbook/wpa_{cli,passphrase,background,priv}.8 %buildroot%_man8dir
%post
%post_service %name
%preun
%preun_service %name
%files
%doc %name/README %name/ChangeLog %name/examples
%_initdir/%name
%config(noreplace) %attr(0600,root,root) %_sysconfdir/wpa_supplicant.conf
%config(noreplace) %_sysconfdir/sysconfig/wpa_supplicant
%config %_sysconfdir/dbus-1/system.d/dbus-%name.conf
%_datadir/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
%if_enabled privsep
%_sbindir/wpa_priv
%endif
%_sbindir/wpa_supplicant
%_sbindir/wpa_cli
%_bindir/wpa_passphrase
%_man5dir/wpa_supplicant.conf.*
%_man8dir/wpa_background.*
%_man8dir/wpa_cli.*
%_man8dir/wpa_supplicant.*
%_man8dir/wpa_passphrase.*
%if_enabled privsep
%_man8dir/wpa_priv.*
%endif
%changelog
…
Full changelog you can see here