]>
Commit | Line | Data |
---|---|---|
1 | # Conditional build: | |
2 | %bcond_without dist_kernel # allow non-distribution kernel | |
3 | %bcond_with verbose # verbose build (V=1) | |
4 | ||
5 | %define rel 15 | |
6 | %define pname wl | |
7 | %define file_ver %(echo %{version} | tr . _) | |
8 | Summary: Broadcom 802.11 a/b/g/n hybrid Linux networking device driver | |
9 | Name: kernel%{_alt_kernel}-net-wl | |
10 | Version: 5.100.82.112 | |
11 | Release: %{rel}@%{_kernel_ver_str} | |
12 | License: other | |
13 | Group: Base/Kernel | |
14 | Source0: http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86_32-v%{file_ver}.tar.gz | |
15 | # Source0-md5: 62d04d148b99f993ef575a71332593a9 | |
16 | Source1: http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86_64-v%{file_ver}.tar.gz | |
17 | # Source1-md5: 310d7ce233a9a352fbe62c451b2ea309 | |
18 | Source2: http://www.broadcom.com/docs/linux_sta/README.txt | |
19 | # Source2-md5: 6fd54aac59a53559d01520f35500693b | |
20 | Patch1: kernel-net-wl-linux-3.2.patch | |
21 | Patch2: kernel-net-wl-linux-3.4.patch | |
22 | Patch3: kernel-net-wl-linux-3.10.patch | |
23 | URL: http://www.broadcom.com/support/802.11/linux_sta.php | |
24 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
25 | BuildRequires: rpmbuild(macros) >= 1.379 | |
26 | Requires(post,postun): /sbin/depmod | |
27 | %if %{with dist_kernel} | |
28 | %requires_releq_kernel | |
29 | Requires(postun): %releq_kernel | |
30 | %endif | |
31 | ExclusiveArch: %{ix86} %{x8664} | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define _enable_debug_packages 0 | |
35 | ||
36 | %description | |
37 | These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux | |
38 | device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4313-, | |
39 | BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and | |
40 | BCM43228-based hardware. | |
41 | ||
42 | %prep | |
43 | %ifarch %{x8664} | |
44 | %define src 1 | |
45 | %else | |
46 | %define src 0 | |
47 | %endif | |
48 | %setup -c -T -q -n %{pname}-%{version} -b%src | |
49 | %patch1 -p0 | |
50 | %patch2 -p0 | |
51 | %patch3 -p1 | |
52 | ||
53 | cat > Makefile << EOF | |
54 | obj-m += wl.o | |
55 | ||
56 | wl-objs := src/wl/sys/wl_linux.o | |
57 | wl-objs += src/wl/sys/wl_iw.o | |
58 | wl-objs += src/shared/linux_osl.o | |
59 | ||
60 | EXTRA_CFLAGS := -I%{_builddir}/%{pname}-%{version}/src/include | |
61 | EXTRA_CFLAGS += -I%{_builddir}/%{pname}-%{version}/src/wl/sys | |
62 | ||
63 | EXTRA_LDFLAGS := $PWD/lib/wlc_hybrid.o_shipped | |
64 | EOF | |
65 | ||
66 | %build | |
67 | %build_kernel_modules -m wl | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | %install_kernel_modules -m wl -d kernel/drivers/net/wireless | |
72 | install %{SOURCE2} . | |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %post | |
78 | %depmod %{_kernel_ver} | |
79 | ||
80 | %posttrans | |
81 | %banner -e kernel%{_alt_kernel}-net-wl <<EOF | |
82 | WARNING! This kernel module is not GPL licensed. | |
83 | Before using it be sure to accept license: %{_docdir}/kernel%{_alt_kernel}-net-wl-%{version}/LICENSE.txt* | |
84 | EOF | |
85 | ||
86 | %postun | |
87 | %depmod %{_kernel_ver} | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc lib/LICENSE.txt README.txt | |
92 | /lib/modules/%{_kernel_ver}/kernel/drivers/net/wireless/*.ko* |