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