compat-wireless-vl.spec 4.3 KB

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