]>
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 8 | |
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 | URL: http://www.broadcom.com/support/802.11/linux_sta.php | |
23 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
24 | BuildRequires: rpmbuild(macros) >= 1.379 | |
25 | Requires(post,postun): /sbin/depmod | |
26 | %if %{with dist_kernel} | |
27 | %requires_releq_kernel | |
28 | Requires(postun): %releq_kernel | |
29 | %endif | |
30 | ExclusiveArch: %{ix86} %{x8664} | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %define _enable_debug_packages 0 | |
34 | ||
35 | %description | |
36 | These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux | |
37 | device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4313-, | |
38 | BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and | |
39 | BCM43228-based hardware. | |
40 | ||
41 | %prep | |
42 | %ifarch %{x8664} | |
43 | %define src 1 | |
44 | %else | |
45 | %define src 0 | |
46 | %endif | |
47 | %setup -c -T -q -n %{pname}-%{version} -b%src | |
48 | %patch1 -p0 | |
49 | %patch2 -p0 | |
50 | ||
51 | cat > Makefile << EOF | |
52 | obj-m += wl.o | |
53 | ||
54 | wl-objs := src/wl/sys/wl_linux.o | |
55 | wl-objs += src/wl/sys/wl_iw.o | |
56 | wl-objs += src/shared/linux_osl.o | |
57 | ||
58 | EXTRA_CFLAGS := -I%{_builddir}/%{pname}-%{version}/src/include | |
59 | EXTRA_CFLAGS += -I%{_builddir}/%{pname}-%{version}/src/wl/sys | |
60 | ||
61 | EXTRA_LDFLAGS := $PWD/lib/wlc_hybrid.o_shipped | |
62 | EOF | |
63 | ||
64 | %build | |
65 | %build_kernel_modules -m wl | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | %install_kernel_modules -m wl -d kernel/drivers/net/wireless | |
70 | install %{SOURCE2} . | |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %post | |
76 | %depmod %{_kernel_ver} | |
77 | ||
78 | %posttrans | |
79 | %banner -e kernel%{_alt_kernel}-net-wl <<EOF | |
80 | WARNING! This kernel module is not GPL licensed. | |
81 | Before using it be sure to accept license: %{_docdir}/kernel%{_alt_kernel}-net-wl-%{version}/LICENSE.txt* | |
82 | EOF | |
83 | ||
84 | %postun | |
85 | %depmod %{_kernel_ver} | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc lib/LICENSE.txt README.txt | |
90 | /lib/modules/%{_kernel_ver}/kernel/drivers/net/wireless/*.ko* |