| 1 | %define origsnapdate 2010-02-12 |
|---|
| 2 | %define snapdate %(echo %origsnapdate | sed -e 's/-//g') |
|---|
| 3 | |
|---|
| 4 | %define build_kmod %{?_with_kmod:1}%{!?_with_kmod:0} |
|---|
| 5 | %define kversion %(uname -r) |
|---|
| 6 | %define kver %(uname -r | sed -e 's/-/_/g') |
|---|
| 7 | %define kflavor %(uname -r | sed -e 's/.*vl.//') |
|---|
| 8 | %if "%kflavor" == "" |
|---|
| 9 | %undefine kflavor |
|---|
| 10 | %endif |
|---|
| 11 | %define kmod kernel-module%{?kflavor:-%{kflavor}} |
|---|
| 12 | |
|---|
| 13 | %define name compat-wireless |
|---|
| 14 | %define ver 0.%{snapdate} |
|---|
| 15 | %define rel 1%{?_dist_release} |
|---|
| 16 | |
|---|
| 17 | Summary: Collection of recent wireless drivers backported |
|---|
| 18 | Name: %{name} |
|---|
| 19 | Version: %{ver} |
|---|
| 20 | Release: %{rel} |
|---|
| 21 | Source0: http://wireless.kernel.org/download/compat-wireless-2.6/%{name}-%{origsnapdate}.tar.bz2 |
|---|
| 22 | |
|---|
| 23 | License: GPLv2+ |
|---|
| 24 | Group: System Environment/Base |
|---|
| 25 | URL: http://wireless.kernel.org/ |
|---|
| 26 | Vendor: Project Vine |
|---|
| 27 | Distribution: Vine Linux |
|---|
| 28 | |
|---|
| 29 | BuildRequires: kernel-devel >= 2.6.22 |
|---|
| 30 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | %description |
|---|
| 34 | This package contains utilities for the latest Linux wireless drivers |
|---|
| 35 | backported to kernel >= 2.6.22. |
|---|
| 36 | |
|---|
| 37 | %description -l ja |
|---|
| 38 | このパッケージには、kernel >= 2.6.22 用にバックポートされた |
|---|
| 39 | 最新の Linux 無線 LAN デバイスドライバ用のツールが収録されています。 |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | %package -n %{kmod}-%{name} |
|---|
| 43 | Summary: Collection of recent wireless drivers backported |
|---|
| 44 | Version: %{ver}_%{kver} |
|---|
| 45 | License: BSD or GPL |
|---|
| 46 | Group: System Environment/Kernel |
|---|
| 47 | Requires: %{name} >= %{ver}-%{release} |
|---|
| 48 | Requires(pre): kernel = %{kversion} |
|---|
| 49 | |
|---|
| 50 | %description -n %{kmod}-%{name} |
|---|
| 51 | This package contains the latest Linux wireless drivers |
|---|
| 52 | backpoted to kernel >= 2.6.22. |
|---|
| 53 | |
|---|
| 54 | This package is built explicitly for kernel-%{kversion}. |
|---|
| 55 | |
|---|
| 56 | %description -l ja -n %{kmod}-%{name} |
|---|
| 57 | このパッケージには、kernel >= 2.6.22 用にバックポートされた |
|---|
| 58 | 最新の Linux 無線 LAN デバイスドライバ群が収録されています。 |
|---|
| 59 | |
|---|
| 60 | このパッケージは kernel-%{kversion} 用に作成されています。 |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | %prep |
|---|
| 64 | %setup -q -n %{name}-%{origsnapdate} |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | %build |
|---|
| 68 | %if %{build_kmod} |
|---|
| 69 | %__make |
|---|
| 70 | %endif |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | %install |
|---|
| 74 | %__rm -rf %{buildroot} |
|---|
| 75 | |
|---|
| 76 | %if %{build_kmod} |
|---|
| 77 | %__make -C /lib/modules/%{kversion}/build \ |
|---|
| 78 | INSTALL_MOD_PATH=%{buildroot} \ |
|---|
| 79 | M=`pwd` \ |
|---|
| 80 | modules_install |
|---|
| 81 | %else |
|---|
| 82 | %__install -d %{buildroot}%{_libdir}/compat-wireless |
|---|
| 83 | %__install -d %{buildroot}%{_sbindir} |
|---|
| 84 | %__install scripts/modlib.sh %{buildroot}%{_libdir}/compat-wireless/ |
|---|
| 85 | %__install scripts/madwifi-unload %{buildroot}%{_sbindir}/ |
|---|
| 86 | %__install scripts/athenable %{buildroot}%{_sbindir}/ |
|---|
| 87 | %__install scripts/b43enable %{buildroot}%{_sbindir}/ |
|---|
| 88 | %__install scripts/iwl-enable %{buildroot}%{_sbindir}/ |
|---|
| 89 | %__install scripts/athload %{buildroot}%{_sbindir}/ |
|---|
| 90 | %__install scripts/b43load %{buildroot}%{_sbindir}/ |
|---|
| 91 | %__install scripts/iwl-load %{buildroot}%{_sbindir}/ |
|---|
| 92 | %endif |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | %clean |
|---|
| 96 | %__rm -rf ${RPM_BUILD_ROOT} |
|---|
| 97 | |
|---|
| 98 | |
|---|
| 99 | %post -n %{kmod}-%{name} |
|---|
| 100 | /sbin/depmod -a -F /boot/System.map-%{kversion} %{kversion} |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | %if ! %{build_kmod} |
|---|
| 104 | %files |
|---|
| 105 | %defattr(-,root,root) |
|---|
| 106 | %doc COPYRIGHT README |
|---|
| 107 | %{_sbindir}/* |
|---|
| 108 | %{_libdir}/compat-wireless/* |
|---|
| 109 | %else |
|---|
| 110 | %files -n %{kmod}-%{name} |
|---|
| 111 | /lib/modules/%{kversion}/extra/* |
|---|
| 112 | %endif |
|---|
| 113 | |
|---|
| 114 | |
|---|
| 115 | %changelog |
|---|
| 116 | * Sat Feb 13 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.20100212-1 |
|---|
| 117 | - updated to 2010-02-12 |
|---|
| 118 | |
|---|
| 119 | * Thu Oct 8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.20091008-1 |
|---|
| 120 | - updated to 2009-10-05 |
|---|
| 121 | |
|---|
| 122 | * Thu Jul 2 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.20090630-2 |
|---|
| 123 | - add Patch0 to boost build time |
|---|
| 124 | (see: http://osdir.com/ml/linux-wireless/2009-06/msg00875.html) |
|---|
| 125 | |
|---|
| 126 | * Thu Jul 2 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.20090630-1 |
|---|
| 127 | - updated to 2009-06-30 |
|---|
| 128 | |
|---|
| 129 | * Sat May 2 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.20090502-1 |
|---|
| 130 | - updated to 2009-05-02 |
|---|
| 131 | |
|---|
| 132 | * Wed Mar 25 2009 Shu KONNO <owa@bg.wakwak.com> 0.20090325-1 |
|---|
| 133 | - updated to 2009-03-25 |
|---|
| 134 | |
|---|
| 135 | * Sun Mar 15 2009 Shu KONNO <owa@bg.wakwak.com> 0.20090314-1 |
|---|
| 136 | - new upstream release |
|---|
| 137 | |
|---|
| 138 | * Fri Mar 6 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.20090305-1 |
|---|
| 139 | - initial package for Vine Linux |
|---|