integrate madwifi-9.4
[madwifi.git] / madwifi.spec
index 1782673..0cd7657 100644 (file)
@@ -1,14 +1,11 @@
 #
-# madwifi spec file
-#
-# RPM spec file
+# $Id$
 #
+%define url $URL$
+
 # Marc E. Fiuczynski <mef@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 # License is GPL.
-#
-# $Id$
-#
 
 # 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
@@ -16,8 +13,9 @@
 
 %define name madwifi
 %define version 0.9.3.3
+%define taglevel 1
 
-%define release %{kernel_version}.1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+%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}
 
@@ -33,8 +31,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 
 Vendor: MadWifi
 Packager: PlanetLab <devel@planet-lab.org>
-Distribution: PlanetLab 4.2
-URL: http://sourceforge.net/projects/madwifi/
+Distribution: PlanetLab %{plrelease}
+URL: %(echo %{url} | cut -d ' ' -f 2)
 
 Requires: coreutils
 
@@ -48,13 +46,17 @@ madwifi is a new generation driver for the Atheros chipset
 rm -rf $RPM_BUILD_ROOT
 
 # with the new build, we use the kernel-devel rpm for building
-linux=/usr/src/kernels/%{kernel_id_arch}
+%define kernelpath /usr/src/kernels/%{kernel_id_arch}
 
-%__make KERNELPATH=$linux clean
-%__make KERNELPATH=$linux
-echo 'r' | %__make KERNELPATH=$linux DESTDIR=$RPM_BUILD_ROOT install
+%__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.*
 
@@ -77,22 +79,23 @@ rm -rf $RPM_BUILD_ROOT
 /lib/modules/%{kernel_id}/net/wlan_tkip.ko
 /lib/modules/%{kernel_id}/net/wlan_wep.ko
 /lib/modules/%{kernel_id}/net/wlan_xauth.ko
-/usr/local/bin/80211debug
-/usr/local/bin/80211stats
-/usr/local/bin/athchans
-/usr/local/bin/athctrl
-/usr/local/bin/athdebug
-/usr/local/bin/athkey
-/usr/local/bin/athstats
-/usr/local/bin/wlanconfig
-/usr/local/man/man8/80211debug.8
-/usr/local/man/man8/80211stats.8
-/usr/local/man/man8/athchans.8
-/usr/local/man/man8/athctrl.8
-/usr/local/man/man8/athdebug.8
-/usr/local/man/man8/athkey.8
-/usr/local/man/man8/athstats.8
-/usr/local/man/man8/wlanconfig.8
+/sbin/80211debug
+/sbin/80211stats
+/sbin/athchans
+/sbin/athctrl
+/sbin/athdebug
+/sbin/athkey
+/sbin/athstats
+/sbin/wlanconfig
+/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*
 
 
 %post