broadcom-wl-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. %define oname hybrid-portsrc
  2. %define over %(echo %{version} | tr . _)
  3. %define kname wl
  4. %define downloadurl https://docs.broadcom.com/docs-and-downloads/docs/linux_sta
  5. Summary: Proprietary driver for Broadcom wireless adapters
  6. Summary(ja): Broadcom ワイヤレスドライバ用プロプライエタリドライバ
  7. Name: broadcom-wl
  8. Version: ##VERSION##
  9. Release: ##RELEASE##
  10. License: Freeware and GPLv2 with exception
  11. Group: System Environment/Kernel
  12. URL: http://www.broadcom.com/support/802.11/linux_sta.php
  13. %ifarch %{ix86}
  14. # Source0: http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-%{over}.tar.gz
  15. Source0: %{downloadurl}/hybrid-v35-nodebug-pcoem-%{over}.tar.gz
  16. %endif
  17. %ifarch x86_64
  18. # Source0: http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-%{over}.tar.
  19. Source0: %{downloadurl}/hybrid-v35_64-nodebug-pcoem-%{over}.tar.gz
  20. %endif
  21. Source1: blacklist-broadcom.conf
  22. #Patch100: broadcom-wl-kernel318.patch
  23. # Patches from Debian-sid
  24. Patch101: 14-rdtscl.patch
  25. Patch102: 15-linux47.patch
  26. Patch103: 16-linux48.patch
  27. Patch104: 17-fix-kernel-warnings.patch
  28. Patch105: 18-linux411.patch
  29. Patch106: 19-linux412.patch
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  31. %description
  32. This package contains the proprietary driver for Broadcom wireless adapters
  33. provided by Broadcom. If installed, it will be used for these cards in
  34. preference to the third-party open source driver that requires manual
  35. installation of firmware, or ndiswrapper.
  36. %description -l ja
  37. このパッケージには、Broadcom ワイヤレスアダプタ用のプロプライエタリドライバが
  38. 収録されています。ファームウェアのインストールを手で行わなければいけない
  39. オープンソースドライバや ndiswrapper とは異なり、この Broadcom 社製の
  40. ハイブリッドドライバは単体で動作します。
  41. %package -n dkms-%{name}
  42. Summary: Hybrid kernel module f-r Broadcom wireless adapters
  43. Summary(ja): Broadcom ワイヤレスドライバ用ハイブリッドカーネルモジュール
  44. Group: System Environment/Kernel
  45. Requires(post): dkms
  46. Requires(preun): dkms
  47. %description -n dkms-%{name}
  48. This package contains the proprietary driver for Broadcom wireless adapters
  49. provided by Broadcom. If installed, it will be used for these cards in
  50. preference to the third-party open source driver that requires manual
  51. installation of firmware, or ndiswrapper.
  52. %description -n dkms-%{name} -l ja
  53. このパッケージには、Broadcom ワイヤレスアダプタ用のプロプライエタリドライバが
  54. 収録されています。ファームウェアのインストールを手で行わなければいけない
  55. オープンソースドライバや ndiswrapper とは異なり、この Broadcom 社製の
  56. ハイブリッドドライバは単体で動作します。
  57. %prep
  58. %setup -q -T -c -a0
  59. #%patch100 -p0 -b .kernel318
  60. %patch101 -p2 -b .rdtscl
  61. %patch102 -p2 -b .linux47
  62. %patch103 -p2 -b .linux48
  63. %patch104 -p2 -b .fix-kernel-warnings
  64. %patch105 -p2 -b .linux411
  65. %patch106 -p2 -b .linux412
  66. %install
  67. %{__rm} -rf %{buildroot}
  68. ## DKMS ##
  69. mkdir -p %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}
  70. cp -R * %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/
  71. cat > %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf << EOF
  72. PACKAGE_NAME=%{name}
  73. PACKAGE_VERSION=%{version}-%{release}
  74. BUILT_MODULE_NAME[0]="%{kname}"
  75. BUILT_MODULE_LOCATION[0]="."
  76. DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
  77. MAKE[0]="make"
  78. CLEAN="make clean"
  79. AUTOINSTALL="yes"
  80. EOF
  81. ## BLACKLIST ##
  82. mkdir -p %{buildroot}/etc/modprobe.d
  83. install -m 644 %{SOURCE1} %{buildroot}/etc/modprobe.d/
  84. %clean
  85. %{__rm} -rf %{buildroot}
  86. %post -n dkms-%{name}
  87. dkms add -m %{name} -v %{version}-%{release} --rpm_safe_upgrade
  88. dkms build -m %{name} -v %{version}-%{release} --rpm_safe_upgrade
  89. dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade
  90. exit 0
  91. %preun -n dkms-%{name}
  92. dkms remove -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all || :
  93. %files -n dkms-%{name}
  94. %defattr(-,root,root)
  95. %doc lib/LICENSE.txt
  96. %dir /usr/src/%{name}-%{version}-%{release}
  97. /usr/src/%{name}-%{version}-%{release}/*
  98. /etc/modprobe.d/blacklist-broadcom.conf
  99. %changelog
  100. * Tue Dec 05 2017 Toshiaki Ara <ara_t@384.jp> 6.30.223.271-3
  101. - add patches for build with kernel 4.12
  102. * Wed Nov 22 2017 Toshiaki Ara <ara_t@384.jp> 6.30.223.271-2
  103. - change download URL
  104. * Sat Oct 31 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.30.223.271-1
  105. - dropped patch100.
  106. - new upstream release.
  107. * Sun Aug 2 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 6.30.223.248-2
  108. - added Source100 to build with kernel 3.18
  109. * Wed Nov 19 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 6.30.223.248-1
  110. - new upstream release
  111. - dropped SOURCE2
  112. - updated dmks.conf
  113. * Tue May 05 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 5.10.91.9-1
  114. - initial build for Vine Linux