File broadcom-wl.spec of Package broadcom-wl (Revision f7429719e035affcb7118f75a2d3dd42)

Currently displaying revision f7429719e035affcb7118f75a2d3dd42 , Show latest

161
 
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
68
%if %{defined kernel_module_package_buildreqs}
69
BuildRequires:  %{kernel_module_package_buildreqs}
70
%endif
71
72
%if 0%{?sle_version} >= 150400
73
BuildRequires:  kernel-syms-rt
74
%endif
75
76
%if 0%{?suse_version} > 1500
77
BuildRequires:  suse-module-tools-scriptlets
78
%endif
79
80
%ifarch x86_64
81
%if 0%{?suse_version} >= 1210
82
BuildRequires: libelf-devel
83
%endif
84
%if 0%{?suse_version} > 1600
85
%define kmp_longterm 1
86
%endif
87
%endif
88
%if 0%{?kmp_longterm}
89
BuildRequires:  kernel-syms-longterm
90
%endif
91
Requires:       broadcom-wl-kmp
92
Provides:       wl-kmod-common = %{version}
93
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
94
ExclusiveArch:  %{ix86} x86_64
95
%if %{defined kernel_module_package}
96
%kernel_module_package -n broadcom-wl -x debug -x trace -c %_sourcedir/_projectcert.crt -p %_sourcedir/preamble
97
%endif
98
99
%description
100
These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux®
101
device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-,
102
and BCM4322-based hardware.
103
104
%package KMP
105
Summary:        Wireless driver for Broadcom 43xx series of chips
106
Group:          System/Kernel
107
108
%description KMP
109
These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux®
110
device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-,
111
and BCM4322-based hardware.
112
113
%prep
114
%autosetup -p1 -c hybrid-v35%{driverarch}-nodebug-pcoem-%{underversion}
115
116
%build
117
sed -i 's/\r$//' lib/LICENSE.txt
118
119
set -- *
120
mkdir source
121
mv "$@" source/
122
mkdir obj
123
124
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
125
for flavor in %{flavors_to_build}; do
126
    rm -rf obj/$flavor
127
    cp -r source obj/$flavor
128
    make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules \
129
       M=$PWD/obj/$flavor V=1
130
done
131
132
%install
133
# blacklist
134
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d/
135
mkdir -p %{buildroot}%{_docdir}/%{name}/
136
install -p -m0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/modprobe.d/
137
install -p -m0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
138
install -p -m0644 source/lib/LICENSE.txt %{buildroot}%{_docdir}/%{name}/
139
140
mv %{buildroot}/%{_sysconfdir}/modprobe.d/broadcom-wl-blacklist %{buildroot}/%{_sysconfdir}/modprobe.d/50-broadcom-wl-blacklist.conf
141
142
143
# Kernel module
144
export INSTALL_MOD_PATH=%{buildroot}
145
export INSTALL_MOD_DIR=updates
146
export BRP_PESIGN_FILES='*.ko'
147
export BRP_PESIGN_COMPRESS_MODULE="xz"
148
for flavor in %{flavors_to_build}; do
149
     make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \
150
        M=$PWD/obj/$flavor
151
done
152
153
%files
154
%defattr(-,root,root)
155
%doc %dir %{_docdir}/%{name}
156
%doc %{_docdir}/%{name}/LICENSE.txt
157
%doc %{_docdir}/%{name}/README.SUSE
158
%config(noreplace) %{_sysconfdir}/modprobe.d/50-broadcom-wl-blacklist.conf
159
160
%changelog
161