# # $Id$ # %define url $URL$ # Marc E. Fiuczynski # Copyright (C) 2006 The Trustees of Princeton University # License is GPL. # kernel_release, kernel_version and kernel_arch are expected to be set by the build to e.g. # kernel_release : vs2.3.0.29.1.planetlab # kernel_version : 2.6.22.14 %define name madwifi %define version 0.9.4 %define taglevel 2 %define release %{kernel_version}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} %define kernel_id_arch %{kernel_version}-%{kernel_release}-%{kernel_arch} %define kernel_id %{kernel_version}-%{kernel_release} Summary: madwifi Atheros driver Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System Environment/Kernel Source0: %{name}-%{version}.tar.bz2 Source1: ifup-pre-local BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Vendor: MadWifi Packager: PlanetLab Distribution: PlanetLab %{plrelease} URL: %(echo %{url} | cut -d ' ' -f 2) Requires: coreutils %description madwifi is a new generation driver for the Atheros chipset %prep %setup %build rm -rf $RPM_BUILD_ROOT # with the new build, we use the kernel-devel rpm for building %define kernelpath /usr/src/kernels/%{kernel_id_arch} %__make KERNELPATH=%kernelpath clean %__make KERNELPATH=%kernelpath %install rm -fr $RPM_BUILD_ROOT echo 'r' | %__make KERNELPATH=%kernelpath BINDIR=/sbin MANDIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/ifup-pre-local # Remove depmod files, will be regenerated in %post rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/modules.* %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %dir /lib/modules/%{kernel_id} /lib/modules/%{kernel_id}/net/ath_hal.ko /lib/modules/%{kernel_id}/net/ath_pci.ko /lib/modules/%{kernel_id}/net/ath_rate_sample.ko /lib/modules/%{kernel_id}/net/ath_rate_amrr.ko /lib/modules/%{kernel_id}/net/ath_rate_onoe.ko /lib/modules/%{kernel_id}/net/wlan.ko /lib/modules/%{kernel_id}/net/wlan_acl.ko /lib/modules/%{kernel_id}/net/wlan_ccmp.ko /lib/modules/%{kernel_id}/net/wlan_scan_ap.ko /lib/modules/%{kernel_id}/net/wlan_scan_sta.ko /lib/modules/%{kernel_id}/net/wlan_tkip.ko /lib/modules/%{kernel_id}/net/wlan_wep.ko /lib/modules/%{kernel_id}/net/wlan_xauth.ko /lib/modules/%{kernel_id}/net/ath_rate_minstrel.ko /sbin/80211debug /sbin/80211stats /sbin/athchans /sbin/athctrl /sbin/athdebug /sbin/athkey /sbin/athstats /sbin/wlanconfig /sbin/ath_info /sbin/ifup-pre-local %{_mandir}/man8/80211debug.8* %{_mandir}/man8/80211stats.8* %{_mandir}/man8/athchans.8* %{_mandir}/man8/athctrl.8* %{_mandir}/man8/athdebug.8* %{_mandir}/man8/athkey.8* %{_mandir}/man8/athstats.8* %{_mandir}/man8/wlanconfig.8* %{_mandir}/man8/ath_info.8* %post depmod -a %{kernel_id} >/dev/null 2>&1 || : # ask for a reboot %preun %postun # 0 = erase, 1 = upgrade if [ $1 -eq 0 ] ; then dir=/lib/modules/%{kernel_id} # If we were the only module installed, remove the module dependencies if [ ! -d $dir/kernel ] ; then [ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rmmoddep --remove %{kernel_id} else depmod -a %{kernel_id} >/dev/null 2>&1 || : fi fi %changelog * Thu Oct 02 2008 Thierry Parmentelat - madwifi-0.9.4-2 - specfile adjustments for 0.9.4 * Tue Dec 04 2007 Thierry Parmentelat - updated to build against kernel-devel * Mon Apr 16 2007 Thierry Parmentelat - imported 0.9.3, re-used Marcs spec file * Fri Dec 01 2006 Marc E. Fiuczynski - Initial release