Remove struct ath_pci_softc, it's pointless for supported kernels
[madwifi/.git] / contrib / madwifi.spec.in
1 #
2 #Gen the last kernel-devel available on the machine.
3 ###%{!?kernel: %{expand: %%define        kernel          %(rpm -q kernel-devel --qf %%{version}-%%{release}\\n | sort | tail -1)}}
4 %{!?kernel: %{expand: %%define        kernel          %(rpm -q kernel-devel --last | head -1 | awk '{print $1}' | sed s/kernel-devel-// )}}
5 %if %(echo %{kernel} | grep -c smp)
6       %{expand:%%define myksmp -smp}
7 %endif
8 #
9 %define       mykversion        %(echo %{kernel} | sed -e s/smp// -)
10 %define       mykrelver         %(echo %{mykversion} | tr -s '-' '_')
11 # Define based on the tar ball extract.
12 # Those two variable will be instanced during the tarball generation
13 %define       revision       @@SVNREL@@
14 %define       snapshot       @@DDAY@@
15 # branch is not used yet.
16 %define       branch         @@BRANCH@@
17 Summary: A linux device driver for Atheros chipsets (ar5210, ar5211, ar5212).
18 Name: madwifi
19 Version: 0.%{revision}.%{snapshot}
20 Release: 6
21 License: GPL2
22 Group: System Environment/Kernel
23 URL: http://madwifi-project.org
24 #Source0: http://snapshots.madwifi-project.org/%{name}-%{branch}-r%{revision}-%{snapshot}.tar.gz
25 # Changes accordingly to the new rule :  madwifi-ng-r<revision>-<generation date>.tar.gz
26 Source0: http://snapshots.madwifi-project.org/madwifi-ng/%{name}-ng-r%{revision}-%{snapshot}.tar.gz
27 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
28 Requires: /sbin/depmod
29 Requires: %{name}-module >= %{version}
30 BuildRequires: /sbin/depmod
31 BuildRequires:  /lib/modules/%{mykversion}/build/Makefile
32
33
34 %description 
35 This software contains a Linux kernel driver for Atheros-based
36 Wireless LAN devices.  The driver supports station, AP, ad-hoc, and
37 monitor modes of operation.  The Atheros driver depends on a
38 device-independent implementation of the 802.11 protocols that
39 originated in the BSD community (NetBSD in particular).
40 The driver functions as a normal network device and uses the Wireless
41 Extensions API.  As such normal Linux tools can and should be used
42 with it.  Where the wireless extensions are lacking private ioctls
43 have been added.
44 There is only one driver included here; it supports PCI, miniPCI
45 and Cardbus devices - USB devices are currently not supported by
46 this driver!  The driver can be built as a module or linked
47 directly into the kernel.  Note however that the net80211 layer is
48 device-independent; there is no reason it cannot be used with any
49 802.11 device (in fact on BSD systems this is the case).
50 There are currently 3 "programming generations" of Atheros 802.11
51 wireless devices (some of these have multiple hardware implementations
52 but otherwise appear identical to users):
53 5210    supports 11a only
54 5211    supports both 11a and 11b
55 5212    supports 11a, 11b, and 11g
56
57 %package module
58 Summary: A linux device driver for Atheros chipsets (ar5210, ar5211, ar5212).
59 Group: System Environment/Kernel
60 Requires: kernel = %{mykversion}
61 Release: 6_%{mykrelver}
62
63 %description module
64 This software is broken into multiple modules.  The Atheros-specific
65 device support is found in the ath_pci module; it should be loaded
66 when an Atheros wireless device is recognized.  The ath_pci module
67 requires an additional device specific module, ath_hal, which is
68 described more below.  In addition the driver requires the wlan
69 module which contains the 802.11 state machine, protocol support,
70 and other device-independent support needed by any 802.11 device.
71 This code is derived from work that first appeared in NetBSD and
72 then FreeBSD.  The wlan module may also force the loading of
73 additional modules for crypto support (wlan_wep, wlan_tkip, wlan_ccmp,
74 etc.), for MAC-based ACL support (wlan_acl), and for 802.1x
75 authenticator support (wlan_xauth).  The latter modules are only 
76 used when operating as an AP.  The crypto modules are loaded when 
77 keys of that type are created.
78
79 %prep 
80 #%setup -q 
81 #%setup -q -n %{name}-%{branch}-r%{revision}-%{snapshot}
82 %setup -q -n %{name}-ng-r%{revision}-%{snapshot}
83 find . -name Makefile\* | xargs perl -pi -e's,/sbin/depmod,: /sbin/depmod,'
84
85 %build 
86 export KERNELRELEASE=%{mykversion}
87 export KERNELPATH=/lib/modules/%{mykversion}/build
88 export KERNELCONF=/lib/modules/%{mykversion}/build/.config
89 export KMODPATH=/lib/modules/%{mykversion}/net
90 export COPTS="-I /lib/modules/%{mykversion}/build/include/ $COPTS"
91 # export ATH_RATE=ath_rate/onoe
92 make 
93 # cd tools ; make all ; cd ..
94
95 %install 
96 export KERNELRELEASE=%{mykversion}
97 export KERNELPATH=/lib/modules/%{mykversion}/build
98 export KERNELCONF=/lib/modules/%{mykversion}/build/.config
99 export KMODPATH=/lib/modules/%{mykversion}/net
100
101 rm -rf %{buildroot}
102
103 # make info
104 mkdir -p  %{buildroot}/usr/local/bin
105 mkdir -p  %{buildroot}/$KMODPATH
106 mkdir -p  %{buildroot}/usr/share/madwifi
107
108 make install DESTDIR=%{buildroot} KERNELPATH=/lib/modules/%{mykversion}/build
109 # cd tools ; make install DESTDIR=%{buildroot} KERNELPATH=/lib/modules/%{mykversion}/build BINDIR=/usr/local/bin  ; cd ..
110
111 %post  module
112 /sbin/depmod -ae %{mykversion}
113
114 %postun  module
115 /sbin/depmod -ae %{mykversion}
116
117 %clean 
118 rm -rf %{buildroot}
119
120 %files
121 %doc COPYRIGHT README INSTALL THANKS 
122 %attr(0755,root,root) /usr/local/bin/*
123 %attr(0644,root,root) /usr/local/man/*
124
125 %files module
126 %defattr(-,root,root,-)
127 /lib/modules/%{mykversion}/net/*.*o
128
129 #
130 %changelog
131 * Thu May 28 2009  Michael Renzmann <mrenzmann@madwifi-project.org>
132 - Update references to project website with new domain
133
134 * Wed Dec 14 2005  Patrick Pichon <Patrick.Pichon@laposte.net>
135 - Update accordingly to the new file name rule:  madwifi-ng-r<revision>-<generation date>.tar.gz
136 - 'branch' tag is not use yet. 'ng' is hardcoded as part of the file name
137 - Change the computation to target the latest kernel-devel env.
138
139 * Thu Nov 3 2005  Patrick Pichon <Patrick.Pichon@laposte.net>
140 - Incorporate the changes made on the Makefile
141 - Cleaning on the Description fields
142 - Changing the URL to the new madwifi.org's one.
143 - Install under /usr/share/doc/madwifi-release the INSTALL and THANKS files
144 - Install under /usr/share/doc/madwifi-release the docs files.
145
146 * Sun Oct 30 2005  Patrick Pichon <Patrick.Pichon@laposte.net>
147 - Add Man pages
148
149 * Mon Oct 24 2005  Lyonel Vincent <>
150 - Fix the --rebuild option.
151
152 * Mon Oct 3 2005  Lyonel Vincent <>
153 - Build by default on latest kernel installed
154
155 * Wed Jul 20 2005 Patrick Pichon <Patrick.Pichon@laposte.net
156 - target particular kernel
157
158 * Mon Oct 27 2004 Patrick Pichon <Patrick.Pichon@laposte.net>
159 - Handle 2.4 kernel
160
161 * Mon Sep 21 2004 Lyonel Vincent <>
162 - change the naming of the kernel module part.
163
164 * Mon Aug 23 2004 Patrick Pichon <Patrick.Pichon@laposte.net>
165 - Update WPA has been merged into HEAD
166
167 * Mon Jul 27 2004 Patrick Pichon <Patrick.Pichon@laposte.net>
168 - Update to handle WPA branch.
169
170 * Tue Jul 08 2004 Patrick Pichon <Patrick.Pichon@laposte.net>
171 - Initial Release