%define name hostapd %define version 1.1 %define release %mkrel 2 Name: %{name} Version: %{version} Release: %{release} URL: http://hostap.epitest.fi/hostapd/ Group: System/Servers Source0: %{name}-%version.tar.gz Source1: %{name}.init Source2: %{name}-config-build Source3: %{name}.service Patch0: %{name}-config.patch Patch1: hostapd-CVE-2012-4445.patch Summary: Optional user space component for Host AP driver License: GPL BuildRequires: libopenssl-devel BuildRequires: libnl-devel Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 BuildRequires: systemd-units Requires(post): sysvinit Requires(preun): sysvinit Requires(postun): sysvinit %description Hostapd is an optional user space component for Host AP driver. It adds more features to the basic IEEE 802.11 management included in the kernel driver: using external RADIUS authentication server for MAC address based access control, IEEE 802.1X Authenticator and dynamic WEP keying, RADIUS accounting. %prep %setup -q -n %{name}-%{version} %patch0 -p0 -b .mdkconf %patch1 -p1 -b .CVE-2012-4445 pushd %{name} cp %{SOURCE2} .config popd %build pushd %{name} %{__perl} -pi -e 's/CFLAGS =.*/CFLAGS = -MMD %{optflags}/' Makefile %{__make} CC="%{__cc}" #CFLAGS="-MMD %{optflags}" popd %install pushd %{name} install -d -m 755 %{buildroot}%{_sbindir} install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} install -d -m 755 %{buildroot}%{_initrddir} install -d -m 755 %{buildroot}/%{_unitdir} install -m 755 %{name} %{buildroot}%{_sbindir} install -m 755 %{name}_cli %{buildroot}%{_sbindir} install -m 600 %{name}.conf %{buildroot}%{_sysconfdir}/%{name} install -m 644 %{name}.accept %{buildroot}%{_sysconfdir}/%{name} install -m 644 %{name}.deny %{buildroot}%{_sysconfdir}/%{name} install -pm 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} install -pm 644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service popd %post %_post_service %{name} %preun %_preun_service %{name} %postun %_postun_userdel %{name} %files %doc %{name}/ChangeLog %{name}/README %{_sbindir}/%{name} %{_sbindir}/%{name}_cli %config(noreplace) %{_initrddir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %config(noreplace) %{_sysconfdir}/%{name}/%{name}.accept %config(noreplace) %{_sysconfdir}/%{name}/%{name}.deny %config(noreplace) %{_unitdir}/%{name}.service %changelog * Sat Jan 12 2013 umeabot <umeabot> 1.1-2.mga3 + Revision: 353276 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Jan 06 2013 cjw <cjw> 1.1-1.mga3 + Revision: 339754 - 1.1 * Tue Oct 09 2012 luigiwalser <luigiwalser> 1.0-2.mga3 + Revision: 303910 - add upstream patch to fix CVE-2012-4445 - tighten up default permissions on hostapd.conf (fix CVE-2012-2389) * Mon Jun 11 2012 cjw <cjw> 1.0-1.mga3 + Revision: 259859 - new version 1.0 - disable madwifi driver since it does not build with current userspace kernel headers - update build config (enables 802.11n support) * Sat Apr 28 2012 tmb <tmb> 0.7.3-4.mga2 + Revision: 233727 - Require rpm-helper >= 0.24.8-1 for systemd support * Wed Feb 29 2012 dmorgan <dmorgan> 0.7.3-3.mga2 + Revision: 215950 - Migrate to systemd ( Fedora) * Thu Apr 21 2011 cjw <cjw> 0.7.3-2.mga1 + Revision: 89339 - imported package hostapd