]>
Commit | Line | Data |
---|---|---|
cd8b6608 ZU |
1 | # Conditional build: |
2 | %bcond_without dist_kernel # allow non-distribution kernel | |
3 | %bcond_without kernel # don't build kernel modules | |
4 | %bcond_without userspace # don't build userspace programs | |
5 | %bcond_with verbose # verbose build (V=1) | |
6 | ||
7 | %if %{without kernel} | |
8 | %undefine with_dist_kernel | |
9 | %endif | |
10 | %if "%{_alt_kernel}" != "%{nil}" | |
11 | %undefine with_userspace | |
12 | %endif | |
13 | %if %{without userspace} | |
14 | # nothing to be placed to debuginfo package | |
15 | %define _enable_debug_packages 0 | |
16 | %endif | |
17 | ||
18 | # | |
19 | # main package. | |
20 | # | |
21 | %define rel 0.1 | |
22 | %define pname wl | |
23 | Summary: Linux kernel module to BCM network cards | |
24 | Name: %{pname}%{_alt_kernel} | |
25 | Version: 5.10.91.9.3 | |
26 | Release: %{rel} | |
27 | License: other | |
28 | Group: Base/Kernel | |
29 | Source0: http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_32-v%{version}.tar.gz | |
30 | # Source0-md5: 15890e1f9afe844adf2e251d390e28ac | |
31 | Source1: http://www.broadcom.com/docs/linux_sta/README.txt | |
32 | # Source1-md5: b3510ce9efc0395021b317f54f645b5d | |
33 | URL: http://www.broadcom.com/support/802.11/linux_sta.php | |
34 | %if %{with kernel} | |
35 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
36 | BuildRequires: rpmbuild(macros) >= 1.379 | |
37 | %endif | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux | |
42 | device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4321-, | |
43 | and BCM4322-based hardware. | |
44 | ||
45 | # kernel subpackages. | |
46 | ||
47 | %package -n kernel%{_alt_kernel}-net-wl | |
48 | Summary: Linux driver for wl | |
49 | Summary(pl.UTF-8): Sterownik dla Linuksa do wl | |
50 | Release: %{rel}@%{_kernel_ver_str} | |
51 | Group: Base/Kernel | |
52 | Requires(post,postun): /sbin/depmod | |
53 | %if %{with dist_kernel} | |
54 | %requires_releq_kernel | |
55 | Requires(postun): %releq_kernel | |
56 | %endif | |
57 | ||
58 | %description -n kernel%{_alt_kernel}-net-wl | |
59 | This is driver for wl for Linux. These packages contain Broadcom's | |
60 | IEEE 802.11a/b/g/n hybrid Linux device driver for use with Broadcom's | |
61 | BCM4311-, BCM4312-, BCM4321-, and BCM4322-based hardware. | |
62 | ||
63 | This package contains Linux module. | |
64 | ||
65 | %prep | |
66 | %setup -q -c -n %{pname}-%{version} | |
67 | ||
68 | cat > Makefile << EOF | |
69 | ||
70 | obj-m += wl.o | |
71 | ||
72 | wl-objs := | |
73 | wl-objs += src/wl/sys/wl_linux.o | |
74 | wl-objs += src/wl/sys/wl_iw.o | |
75 | wl-objs += src/shared/linux_osl.o | |
76 | ||
77 | EXTRA_CFLAGS := | |
78 | EXTRA_CFLAGS += -I%{_builddir}/%{pname}-%{version}/src/include | |
79 | EXTRA_CFLAGS += -I%{_builddir}/%{pname}-%{version}/src/wl/sys | |
80 | EXTRA_CFLAGS += -DCONFIG_MODULE_NAME_SOME_OPTION=1 | |
81 | %{?debug:CFLAGS += -DCONFIG_MODULE_NAME_DEBUG=1} | |
82 | EOF | |
83 | ||
84 | ||
85 | %build | |
86 | %if %{with userspace} | |
87 | ||
88 | ||
89 | %endif | |
90 | ||
91 | %if %{with kernel} | |
92 | ||
93 | %build_kernel_modules -m wl | |
94 | ||
95 | # modules placed in subdirectory: | |
96 | # %build_kernel_modules -C -m wl | |
97 | ||
98 | %endif | |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %if %{with userspace} | |
104 | ||
105 | ||
106 | %endif | |
107 | ||
108 | %if %{with kernel} | |
109 | %install_kernel_modules -m wl -d kernel/net/wireless | |
110 | ||
111 | # to avoid conflict with in-kernel modules, and prepare modprobe config: | |
112 | %install_kernel_modules -s current -n NAME -m wl -d kernel/drivers/net/wireless | |
113 | %endif | |
114 | ||
115 | %clean | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %post -n kernel%{_alt_kernel}-net-wl | |
119 | %depmod %{_kernel_ver} | |
120 | ||
121 | %postun -n kernel%{_alt_kernel}-net-wl | |
122 | %depmod %{_kernel_ver} | |
123 | ||
124 | %if %{with kernel} | |
125 | %files -n kernel%{_alt_kernel}-net-wl | |
126 | %defattr(644,root,root,755) | |
127 | /lib/modules/%{_kernel_ver}/kernel/net/*.ko* | |
128 | %endif | |
129 | ||
130 | %if %{with userspace} | |
131 | %files | |
132 | %defattr(644,root,root,755) | |
133 | ||
134 | %endif |