File broadcom-wl.spec of Package broadcom-wl (Revision 10)
Currently displaying revision 10 , Show latest
137
1
# vim: set ts=4 sw=4 et:
2
#
3
# spec file for package broadcom-wl
4
#
5
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
6
#
7
# All modifications and additions to the file contributed by third parties
8
# remain the property of their copyright owners, unless otherwise agreed
9
# upon. The license for this file, and modifications and additions to the
10
# file, is the same license as for the pristine package itself (unless the
11
# license for the pristine package is not an Open Source License, in which
12
# case the license is the MIT License). An "Open Source License" is a
13
# license that conforms to the Open Source Definition (Version 1.9)
14
# published by the Open Source Initiative.
15
16
# Please submit bugfixes or comments via http://bugs.opensuse.org/
17
#
18
19
20
#!BuildIgnore: enough-build-resources
21
%define underversion 6_30_223_271
22
%ifarch x86_64
23
%define driverarch _64
24
%else
25
%define driverarch %{nil}
26
%endif
27
Name: broadcom-wl
28
Version: 6.30.223.271
29
Release: 0
30
Summary: Wireless driver for Broadcom 43xx series of chips
31
License: SUSE-NonFree
32
Group: System/Kernel
33
Url: http://www.broadcom.com/support/802.11/linux_sta.php
34
Source0: hybrid-v35%{driverarch}-nodebug-pcoem-%{underversion}.tar.gz
35
Source1: README.SUSE
36
Source2: broadcom-wl-blacklist
37
Patch0: broadcom-sta-6.30.223.141-eth-to-wlan.patch
38
Patch1: broadcom-sta-6.30.223.141-gcc.patch
39
Patch2: broadcom-sta-6.30.223.141-makefile.patch
40
Patch3: broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
41
Patch4: broadcom-sta-6.30.223.271-r1-linux-3.18.patch
42
Patch5: broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch
43
Patch6: broadcom-sta-6.30.223.271-r4-linux-4.7.patch
44
Patch7: broadcom-sta-6.30.223.271-r4-linux-4.8.patch
45
Patch11: broadcom-wl.linux-4.11.patch
46
Patch12: broadcom-wl.linux-4.12.patch
47
Patch14: broadcom-wl.linux-4.14.patch
48
Patch15: broadcom-wl.linux-4.15.patch
49
%if %{defined kernel_module_package_buildreqs}
50
BuildRequires: %{kernel_module_package_buildreqs}
51
%endif
52
%ifarch x86_64
53
%if 0%{?suse_version} >= 1210
54
BuildRequires: libelf-devel
55
%endif
56
%endif
57
Requires: broadcom-wl-kmp
58
Provides: wl-kmod-common = %{version}
59
BuildRoot: %{_tmppath}/%{name}-%{version}-build
60
ExclusiveArch: %{ix86} x86_64
61
%if %{defined kernel_module_package}
62
%kernel_module_package
63
%endif
64
65
%description
66
These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux®
67
device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-,
68
and BCM4322-based hardware.
69
70
%package KMP
71
Summary: Wireless driver for Broadcom 43xx series of chips
72
Group: System/Kernel
73
74
%description KMP
75
These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux®
76
device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-,
77
and BCM4322-based hardware.
78
79
%prep
80
%setup -q -c hybrid-v35%{driverarch}-nodebug-pcoem-%{underversion}
81
%patch0 -p1
82
%patch1 -p1
83
%patch2
84
%patch3 -p1
85
%patch4 -p1
86
%patch5 -p1
87
%patch6 -p1
88
%patch7 -p1
89
%patch11 -p1
90
%patch12 -p1
91
%patch14 -p1
92
%patch15 -p1
93
94
%build
95
sed -i 's/\r$//' lib/LICENSE.txt
96
97
set -- *
98
mkdir source
99
mv "$@" source/
100
mkdir obj
101
102
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
103
for flavor in %{flavors_to_build}; do
104
rm -rf obj/$flavor
105
cp -r source obj/$flavor
106
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules \
107
M=$PWD/obj/$flavor V=1
108
done
109
110
%install
111
# blacklist
112
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d/
113
mkdir -p %{buildroot}%{_docdir}/%{name}/
114
install -p -m0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/modprobe.d/
115
install -p -m0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
116
install -p -m0644 source/lib/LICENSE.txt %{buildroot}%{_docdir}/%{name}/
117
118
mv %{buildroot}/%{_sysconfdir}/modprobe.d/broadcom-wl-blacklist %{buildroot}/%{_sysconfdir}/modprobe.d/50-broadcom-wl-blacklist.conf
119
120
121
# Kernel module
122
export INSTALL_MOD_PATH=%{buildroot}
123
export INSTALL_MOD_DIR=updates
124
for flavor in %{flavors_to_build}; do
125
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \
126
M=$PWD/obj/$flavor
127
done
128
129
%files
130
%defattr(-,root,root)
131
%doc %dir %{_docdir}/%{name}
132
%doc %{_docdir}/%{name}/LICENSE.txt
133
%doc %{_docdir}/%{name}/README.SUSE
134
%config(noreplace) %{_sysconfdir}/modprobe.d/50-broadcom-wl-blacklist.conf
135
136
%changelog
137