%define madwifi_version 0.9.4 %define mac80211_version 10.0.2 %define wpa_supplicant_version 0.5.9 Name: hostapd Version: 0.5.10 Release: 1%{?dist} Summary: User space daemon for access point %define _version %{version} Group: System Environment/Daemons License: GPLv2+ URL: http://hostap.epitest.fi/hostapd/ Source0: http://hostap.epitest.fi/releases/hostapd-%{_version}.tar.gz #Source2: http://intellinuxwireless.org/mac80211/downloads/mac80211-%{mac80211_version}.tgz #Source3: http://hostap.epitest.fi/releases/wpa_supplicant-%{wpa_supplicant_version}.tar.gz Patch0: http://kwizart.free.fr/fedora/patches/hostapd-0.6-Base_config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openssl-devel BuildRequires: krb5-devel BuildRequires: zlib-devel BuildRequires: kernel-headers BuildRequires: madwifi-devel Requires: logwatch %description hostapd is a user space daemon for access point and authentication servers. It implements IEEE 802.11 access point management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS authentication server. The current version supports Linux (Host AP, madwifi, Prism54 drivers) and FreeBSD (net80211). hostapd is designed to be a "daemon" program that runs in the background and acts as the backend component controlling authentication. hostapd supports separate frontend programs and an example text-based frontend, hostapd_cli, is included with hostapd. %prep %setup -q -n hostapd-%{_version} %patch0 -p1 -b -kw.patch #setup -q -D -T -a 1 -n hostapd-%{_version} #setup -q -D -T -a 2 -n hostapd-%{_version} #setup -q -D -T -a 3 -n hostapd-%{_version} cp defconfig .config #sed -i -e 's|CONFIG_DRIVER_WIRED=y|#CONFIG_DRIVER_WIRED=y|' .config #sed -i -e 's|CONFIG_IAPP=y|#CONFIG_IAPP=y|' .config #sed -i -e 's|CONFIG_DRIVER_MADWIFI=y|#CONFIG_DRIVER_MADWIFI=y|' .config sed -i -e 's|CONFIG_DRIVER_BSD=y|#CONFIG_DRIVER_BSD=y|' .config sed -i -e 's|CONFIG_DRIVER_DEVICESCAPE=y|#CONFIG_DRIVER_DEVICESCAPE=y|' .config #sed -i -e 's|CONFIG_RADIUS_SERVER=y|#CONFIG_RADIUS_SERVER=y|' .config #sed -i -e 's|# CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/src/linux/include|CFLAGS += -DUSE_KERNEL_HEADERS -I%{_includedir}|' Makefile ## Dyn patch all CFGLAGS inside Makefile - you shouldn't use this for type def problems.. sed -i -e 's|# CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/src/linux/include|CFLAGS +=-DUSE_KERNEL_HEADERS -I%{_includedir} -I%{_includedir}/madwifi -Imac80211-%{mac80211_version}/compatible/include -Imac80211-%{mac80211_version}/compatible/net/mac80211 \nLIBS+=-L%{_libdir}|' Makefile sed -i -e 's|typedef u64 __be64;||' common.h sed -i -e 's|/usr/local/bin/|$(DESTDIR)%{_bindir}/|' Makefile install -m 0644 logwatch/README README.logwatch %build #pushd mac80211-%{mac80211_version} #make source #popd export CFLAGS=$RPM_OPT_FLAGS make %{?_smp_mflags} # DIR_WPA_SUPPLICANT=wpa_supplicant-%{wpa_supplicant_version} \ ## WIP # CFLAGS+="-Id80211-%{d80211_version}/compatible/include -Id80211-%{d80211_version}/compatible/net/d80211" \ # CFLAGS+="-I%{_includedir} -DUSE_KERNEL_HEADERS" \ # CFLAGS="$CFLAGS -Imadwifi-%{madwifi_version}" LIBS+="-L%{_libdir}" \ %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/hostapd install -m 0644 *.conf $RPM_BUILD_ROOT%{_sysconfdir}/hostapd install -m 0644 hostapd.deny $RPM_BUILD_ROOT%{_sysconfdir}/hostapd install -m 0644 hostapd.accept $RPM_BUILD_ROOT%{_sysconfdir}/hostapd mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/log.d/conf/services/ install -m 0644 logwatch/hostapd.conf $RPM_BUILD_ROOT%{_sysconfdir}/log.d/conf/services/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/log.d/scripts/services/ install -m 0755 logwatch/hostapd $RPM_BUILD_ROOT%{_sysconfdir}/log.d/scripts/services/ %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc ChangeLog COPYING developer.txt README README.logwatch %doc hostapd.deny hostapd.accept hostapd.conf %config(noreplace) %{_sysconfdir}/log.d/conf/services/hostapd.conf %config(noreplace) %{_sysconfdir}/hostapd/* %{_sysconfdir}/log.d/scripts/services/hostapd %{_bindir}/hostapd %{_bindir}/hostapd_cli %changelog * Wed May 14 2008 kwizart < kwizart at gmail.com > - 0.5.10-1 - Update to 0.5.10 * Thu Dec 6 2007 kwizart < kwizart at gmail.com > - 0.5.9-1 - Update to 0.5.9 * Tue Feb 27 2007 kwizart < kwizart at gmail.com > - 0.5.7-1 - Update to 0.5.7 - Use tarball for external headers * Fri Dec 29 2006 kwizart < kwizart at gmail.com > - 0.6-0.1.20061228 - Initial release