File broadcom-wl.spec of Package broadcom-wl

162
 
1
# vim: set ts=4 sw=4 et:
2
#
3
# spec file for package broadcom-wl
4
#
5
# Copyright (c) 2017-2025 SUSE LLC
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
# norootforbuild
19
# needssslcertforbuild
20
21
#!BuildIgnore: enough-build-resources
22
%define underversion 6_30_223_271
23
%ifarch x86_64
24
%define driverarch _64
25
%else
26
%define driverarch %{nil}
27
%endif
28
Name:           broadcom-wl
29
Version:        6.30.223.271
30
Release:        0
31
Summary:        Wireless driver for Broadcom 43xx series of chips
32
License:        SUSE-NonFree
33
Group:          System/Kernel
34
Url:            https://www.broadcom.com/site-search?filters[pages][content_type][type]=and&filters[pages][content_type][values][]=Downloads&page=1&per_page=10&q=802.11%20linux%20sta%20wireless%20driver
35
Source0:        hybrid-v35%{driverarch}-nodebug-pcoem-%{underversion}.tar.gz
36
Source1:        README.SUSE
37
Source2:        broadcom-wl-blacklist
38
Patch0:         broadcom-sta-6.30.223.141-eth-to-wlan.patch
39
Patch1:         broadcom-sta-6.30.223.141-gcc.patch
40
Patch2:         broadcom-sta-6.30.223.141-makefile.patch
41
Patch3:         broadcom-sta-6.30.223.248-r3-Wno-date-time.patch
42
Patch4:         broadcom-sta-6.30.223.271-r1-linux-3.18.patch
43
Patch5:         broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch
44
Patch6:         broadcom-sta-6.30.223.271-r4-linux-4.7.patch
45
Patch7:         broadcom-sta-6.30.223.271-r4-linux-4.8.patch
46
Patch8:         isprint.patch
47
Patch9:         broadcom-sta-6.30.223.271-Fix-fall-through-warnings.patch
48
Patch10:        broadcom-sta-6.30.223.271-Fix-mac-address-setting.patch
49
Patch11:        broadcom-wl.linux-4.11.patch
50
Patch12:        broadcom-wl.linux-4.12.patch
51
Patch14:        broadcom-wl.linux-4.14.patch
52
Patch15:        broadcom-wl.linux-4.15.patch
53
Patch16:        broadcom-wl.linux-5.1.patch
54
Patch17:        broadcom-wl.linux-5.6.patch
55
Patch18:        broadcom-wl.linux-5.9.patch
56
Patch19:        broadcom-wl.linux-5.17.patch
57
Patch20:        broadcom-wl.linux-5.18.patch
58
Patch21:        broadcom-wl.linux-6.0.patch
59
Patch22:        broadcom-wl.linux-6.1.patch
60
Patch23:        broadcom-wl.linux-6.5.patch
61
Patch24:        broadcom-wl.linux-6.10_fix_empty_body_in_if_warning.patch
62
Patch25:        broadcom-sta-6.30.223.271-wpa_supplicant-2.11_add_max_scan_ie_len.patch
63
Patch26:        broadcom-wl.linux-6.12.patch
64
Patch27:        broadcom-wl.linux-6.13.patch
65
Patch28:        broadcom-wl.linux-6.14.patch
66
Patch29:        broadcom-wl.linux-6.15.patch
67
Patch30:        broadcom-wl.linux-6.16.patch
68
69
%if %{defined kernel_module_package_buildreqs}
70
BuildRequires:  %{kernel_module_package_buildreqs}
71
%endif
72
73
%if 0%{?sle_version} >= 150400
74
BuildRequires:  kernel-syms-rt
75
%endif
76
77
%if 0%{?suse_version} > 1500
78
BuildRequires:  suse-module-tools-scriptlets
79
%endif
80
81
%ifarch x86_64
82
%if 0%{?suse_version} >= 1210
83
BuildRequires: libelf-devel
84
%endif
85
%if 0%{?suse_version} > 1600
86
%define kmp_longterm 1
87
%endif
88
%endif
89
%if 0%{?kmp_longterm}
90
BuildRequires:  kernel-syms-longterm
91
%endif
92
Requires:       broadcom-wl-kmp
93
Provides:       wl-kmod-common = %{version}
94
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
95
ExclusiveArch:  %{ix86} x86_64
96
%if %{defined kernel_module_package}
97
%kernel_module_package -n broadcom-wl -x debug -x trace -c %_sourcedir/_projectcert.crt -p %_sourcedir/preamble
98
%endif
99
100
%description
101
These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux®
102
device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-,
103
and BCM4322-based hardware.
104
105
%package KMP
106
Summary:        Wireless driver for Broadcom 43xx series of chips
107
Group:          System/Kernel
108
109
%description KMP
110
These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux®
111
device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-,
112
and BCM4322-based hardware.
113
114
%prep
115
%autosetup -p1 -c hybrid-v35%{driverarch}-nodebug-pcoem-%{underversion}
116
117
%build
118
sed -i 's/\r$//' lib/LICENSE.txt
119
120
set -- *
121
mkdir source
122
mv "$@" source/
123
mkdir obj
124
125
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
126
for flavor in %{flavors_to_build}; do
127
    rm -rf obj/$flavor
128
    cp -r source obj/$flavor
129
    make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules \
130
       M=$PWD/obj/$flavor V=1
131
done
132
133
%install
134
# blacklist
135
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d/
136
mkdir -p %{buildroot}%{_docdir}/%{name}/
137
install -p -m0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/modprobe.d/
138
install -p -m0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
139
install -p -m0644 source/lib/LICENSE.txt %{buildroot}%{_docdir}/%{name}/
140
141
mv %{buildroot}/%{_sysconfdir}/modprobe.d/broadcom-wl-blacklist %{buildroot}/%{_sysconfdir}/modprobe.d/50-broadcom-wl-blacklist.conf
142
143
144
# Kernel module
145
export INSTALL_MOD_PATH=%{buildroot}
146
export INSTALL_MOD_DIR=updates
147
export BRP_PESIGN_FILES='*.ko'
148
export BRP_PESIGN_COMPRESS_MODULE="xz"
149
for flavor in %{flavors_to_build}; do
150
     make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \
151
        M=$PWD/obj/$flavor
152
done
153
154
%files
155
%defattr(-,root,root)
156
%doc %dir %{_docdir}/%{name}
157
%doc %{_docdir}/%{name}/LICENSE.txt
158
%doc %{_docdir}/%{name}/README.SUSE
159
%config(noreplace) %{_sysconfdir}/modprobe.d/50-broadcom-wl-blacklist.conf
160
161
%changelog
162