compat-wireless-vl.spec 3.8 KB

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