]> git.pld-linux.org Git - packages/wl.git/blame - wl.spec
* added 17-fix-kernel-warnings.patch from Debian (avoid useless kernel
[packages/wl.git] / wl.spec
CommitLineData
cd8b6608 1# Conditional build:
b51b81d5 2%bcond_without kernel # don't build kernel modules
cd8b6608 3%bcond_with verbose # verbose build (V=1)
cd0280d0 4%bcond_without userspace # don't build userspace programs
493de627 5%bcond_without dkms # build dkms package
ed656948 6
42a6a3da
JR
7%if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
8%{error:kernel and userspace cannot be built at the same time on PLD builders}
9exit 1
10%endif
11
cd0280d0
JR
12%if %{without userspace}
13%undefine with_dkms
14%endif
15
7cf02690
JR
16# nothing to be placed to debuginfo package
17%define _enable_debug_packages 0
18
726f0ca2
JR
19%define _duplicate_files_terminate_build 0
20
f316d7dd 21%define rel 5
7cf02690 22%define pname wl
041038fe 23%define file_ver %(echo %{version} | tr . _)
682c838a 24Summary: Broadcom 802.11 a/b/g/n hybrid Linux networking device driver
42a6a3da 25Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
726f0ca2 26Version: 6.30.223.271
ed656948 27Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
cd8b6608
ZU
28License: other
29Group: Base/Kernel
b2160a76 30Source0: http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-%{file_ver}.tar.gz
726f0ca2 31# Source0-md5: 4e75f4cb7d87f690f9659ffc478495f0
b2160a76 32Source1: http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-%{file_ver}.tar.gz
726f0ca2 33# Source1-md5: 115903050c41d466161784d4c843f4f9
ab9a647c 34Source2: http://www.broadcom.com/docs/linux_sta/README.txt
b2160a76 35# Source2-md5: 8a6e8708a5e00ab6d841cde51d70eb1b
b51b81d5 36Source3: dkms.conf
726f0ca2 37Source4: modprobe.conf
0e2168f7 38Patch0: 13-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch
1f723013 39Patch1: gcc-4.9.patch
c9fb4849 40Patch2: no-dead-code.patch
5bfd004b 41Patch3: linux-4.7.patch
0e2168f7 42Patch4: linux-4.8.patch
f316d7dd 43Patch5: 17-fix-kernel-warnings.patch
f36814b0 44URL: http://www.broadcom.com/support/802.11
87d5fa42
JR
45BuildRequires: rpmbuild(macros) >= 1.701
46%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
b0a31fc8 47ExclusiveArch: %{ix86} %{x8664} x32
cd8b6608
ZU
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%description
51These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux
041038fe
ER
52device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4313-,
53BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and
54BCM43228-based hardware.
cd8b6608 55
b2160a76
ER
56This is an Official Release of Broadcom's hybrid Linux driver for use
57with Broadcom based hardware.
58
7cf02690 59%package -n dkms-%{pname}
b51b81d5
ER
60Summary: DKMS-ready driver for Broadcom WL driver
61Group: Base/Kernel
62Release: %{rel}
63Requires(pre): dkms
64Requires(post): dkms
65%if "%{_rpmversion}" >= "5"
66BuildArch: noarch
67%endif
68
7cf02690 69%description -n dkms-%{pname}
b51b81d5
ER
70This package contains a DKMS-ready driver for Broadcom WL driver.
71
ed656948
JR
72%define kernel_pkg()\
73%package -n kernel%{_alt_kernel}-net-wl\
74Summary: Broadcom 802.11 a/b/g/n hybrid Linux networking device driver\
75Release: %{rel}@%{_kernel_ver_str}\
76Group: Base/Kernel\
77Requires(post,postun): /sbin/depmod\
ed656948
JR
78%requires_releq_kernel\
79Requires(postun): %releq_kernel\
ed656948
JR
80\
81%description -n kernel%{_alt_kernel}-net-wl\
82These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux\
83device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4313-,\
84BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and\
85BCM43228-based hardware.\
86\
87This is an Official Release of Broadcom's hybrid Linux driver for use\
88with Broadcom based hardware.\
89\
90%files -n kernel%{_alt_kernel}-net-wl\
91%defattr(644,root,root,755)\
726f0ca2 92%doc wl/lib/LICENSE.txt README.txt\
ed656948 93/lib/modules/%{_kernel_ver}/kernel/drivers/net/wireless/*.ko*\
726f0ca2 94%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/%{pname}.conf\
ed656948
JR
95\
96%post -n kernel%{_alt_kernel}-net-wl\
97%depmod %{_kernel_ver}\
98\
99%posttrans -n kernel%{_alt_kernel}-net-wl\
100%banner -e kernel%{_alt_kernel}-net-wl <<EOF\
101WARNING! This kernel module is not GPL licensed.\
102Before using it be sure to accept license: %{_docdir}/kernel%{_alt_kernel}-net-wl-%{version}/LICENSE.txt*\
103EOF\
104\
105%postun -n kernel%{_alt_kernel}-net-wl\
106%depmod %{_kernel_ver}\
107%{nil}
108
109%define build_kernel_pkg()\
726f0ca2
JR
110%{__make} -C wl KERNELRELEASE=%{_kernel_ver} KBUILD_DIR=%{_kernelsrcdir} clean\
111%{__make} -C wl KERNELRELEASE=%{_kernel_ver} KBUILD_DIR=%{_kernelsrcdir}\
112%install_kernel_modules -D installed -m wl/wl -d kernel/drivers/net/wireless\
ed656948
JR
113%{nil}
114
87d5fa42 115%{?with_kernel:%{expand:%create_kernel_packages}}
ed656948 116
cd8b6608 117%prep
b0a31fc8 118%ifarch %{x8664} x32
041038fe 119%define src 1
ab9a647c 120%else
041038fe 121%define src 0
ab9a647c 122%endif
7cf02690 123%setup -c -T -q -n %{pname}-%{version} -b%{src}
0e2168f7 124%patch0 -p1
1f723013 125%patch1 -p1
c9fb4849 126%patch2 -p1
5bfd004b 127%patch3 -p1
0e2168f7 128%patch4 -p1
f316d7dd 129%patch5 -p2
cd8b6608 130
726f0ca2
JR
131mkdir wl
132mv lib src Makefile wl/
0c2c4e39
ER
133cp -p %{SOURCE2} .
134
726f0ca2
JR
135# cleanup backups after patching
136find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
cd8b6608 137
cd8b6608 138%build
87d5fa42 139%{?with_kernel:%{expand:%build_kernel_packages}}
cd8b6608 140
cd8b6608
ZU
141%install
142rm -rf $RPM_BUILD_ROOT
726f0ca2
JR
143install -d $RPM_BUILD_ROOT/etc/modprobe.d
144
b51b81d5 145%if %{with kernel}
ed656948
JR
146install -d $RPM_BUILD_ROOT
147cp -a installed/* $RPM_BUILD_ROOT
726f0ca2 148cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/modprobe.d/%{pname}.conf
b51b81d5
ER
149%endif
150
151%if %{with dkms}
7cf02690 152install -d $RPM_BUILD_ROOT%{_usrsrc}/%{pname}-%{version}-%{rel}
726f0ca2 153cp -a wl/Makefile wl/lib wl/src $RPM_BUILD_ROOT%{_usrsrc}/%{pname}-%{version}-%{rel}
7cf02690
JR
154sed -e 's|@pname@|%{pname}|g' -e 's|@MODVERSION@|%{version}-%{rel}|g' \
155 %{SOURCE3} > $RPM_BUILD_ROOT%{_usrsrc}/%{pname}-%{version}-%{rel}/dkms.conf
b51b81d5 156%endif
cd8b6608 157
cd8b6608
ZU
158%clean
159rm -rf $RPM_BUILD_ROOT
160
7cf02690
JR
161%post -n dkms-%{pname}
162%{_sbindir}/dkms add -m %{pname} -v %{version}-%{rel} --rpm_safe_upgrade && \
163%{_sbindir}/dkms build -m %{pname} -v %{version}-%{rel} --rpm_safe_upgrade && \
164%{_sbindir}/dkms install -m %{pname} -v %{version}-%{rel} --rpm_safe_upgrade || :
b51b81d5 165
7cf02690
JR
166%preun -n dkms-%{pname}
167%{_sbindir}/dkms remove -m %{pname} -v %{version}-%{rel} --rpm_safe_upgrade --all || :
b51b81d5 168
b51b81d5 169%if %{with dkms}
7cf02690 170%files -n dkms-%{pname}
b51b81d5 171%defattr(644,root,root,755)
7cf02690 172%{_usrsrc}/%{pname}-%{version}-%{rel}
b51b81d5 173%endif
This page took 0.077538 seconds and 4 git commands to generate.