]>
Commit | Line | Data |
---|---|---|
1 | # Module for kernels <2.6.24 | |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without dist_kernel # allow non-distribution kernel | |
5 | %bcond_without kernel # don't build kernel modules | |
6 | %bcond_with verbose # verbose build (V=1) | |
7 | ||
8 | %ifarch sparc | |
9 | %undefine with_smp | |
10 | %endif | |
11 | ||
12 | %if %{without kernel} | |
13 | %undefine with_dist_kernel | |
14 | %endif | |
15 | %if "%{_alt_kernel}" != "%{nil}" | |
16 | %undefine with_userspace | |
17 | %endif | |
18 | ||
19 | %define rel 3 | |
20 | %define pname e1000e | |
21 | Summary: Intel(R) PRO/1000e driver for Linux | |
22 | Summary(en.UTF-8): Intel® PRO/1000e driver for Linux | |
23 | Summary(pl.UTF-8): Sterownik do karty Intel® PRO/1000e | |
24 | Name: %{pname}%{_alt_kernel} | |
25 | Version: 2.1.4 | |
26 | Release: %{rel} | |
27 | License: GPL v2 | |
28 | Group: Base/Kernel | |
29 | Source0: http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz | |
30 | # Source0-md5: e8dba81bfc86c6c75f39d025fb70899f | |
31 | URL: http://downloads.sourceforge.net/e1000/ | |
32 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
33 | BuildRequires: rpmbuild(macros) >= 1.379 | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | This package contains the Linux driver for the Intel(R) PRO/1000 | |
38 | family of 10/100/1000 Ethernet network adapters. This driver is | |
39 | designed to work with the Intel(R) 82571/2/3/4 PCI-E family of gigabit | |
40 | adapters and 82567 controllers. | |
41 | ||
42 | %description -l en.UTF-8 | |
43 | This package contains the Linux driver for the Intel® PRO/1000 family | |
44 | of 10/100/1000 Ethernet network adapters. This driver is designed to | |
45 | work with the Intel® 82571/2/3/4 PCI-E family of gigabit adapters and | |
46 | 82567 controllers. | |
47 | ||
48 | %description -l pl.UTF-8 | |
49 | Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych | |
50 | 10/100/1000Mbit z rodziny Intel® PRO/1000. Ten sterownik jest | |
51 | stworzony aby pracować z kartami gigabitowymi rodziny Intel® | |
52 | 82571/2/3/4 PCI-E oraz kontrolerami 82567. | |
53 | ||
54 | %package -n kernel%{_alt_kernel}-net-%{pname} | |
55 | Summary: Intel(R) PRO/1000e driver for Linux | |
56 | Summary(en.UTF-8): Intel® PRO/1000e driver for Linux | |
57 | Summary(pl.UTF-8): Sterownik do karty Intel® PRO/1000e | |
58 | Release: %{rel}@%{_kernel_ver_str} | |
59 | Group: Base/Kernel | |
60 | Requires(post,postun): /sbin/depmod | |
61 | %if %{with dist_kernel} | |
62 | %requires_releq_kernel | |
63 | Requires(postun): %releq_kernel | |
64 | %endif | |
65 | ||
66 | %description -n kernel%{_alt_kernel}-net-%{pname} | |
67 | This package contains the Linux driver for the Intel(R) PRO/1000 | |
68 | family of 10/100/1000 Ethernet network adapters. This driver is | |
69 | designed to work with the Intel(R) 82571/2/3/4 PCI-E family of gigabit | |
70 | adapters and 82567 controllers. | |
71 | ||
72 | %description -n kernel%{_alt_kernel}-net-%{pname} -l en.UTF-8 | |
73 | This package contains the Linux driver for the Intel® PRO/1000 family | |
74 | of 10/100/1000 Ethernet network adapters. This driver is designed to | |
75 | work with the Intel® 82571/2/3/4 PCI-E family of gigabit adapters and | |
76 | 82567 controllers. | |
77 | ||
78 | %description -n kernel%{_alt_kernel}-net-%{pname} -l pl.UTF-8 | |
79 | Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych | |
80 | 10/100/1000Mbit z rodziny Intel® PRO/1000. Ten sterownik jest | |
81 | stworzony aby pracować z kartami gigabitowymi rodziny Intel® | |
82 | 82571/2/3/4 PCI-E oraz kontrolerami 82567. | |
83 | ||
84 | %prep | |
85 | %setup -q -n %{pname}-%{version} | |
86 | cat > src/Makefile <<'EOF' | |
87 | obj-m := e1000e.o | |
88 | e1000e-objs := netdev.o ethtool.o param.o \ | |
89 | 82571.o ich8lan.o 80003es2lan.o \ | |
90 | mac.o nvm.o phy.o manage.o kcompat.o | |
91 | ||
92 | EXTRA_CFLAGS=-DDRIVER_E1000E -DCONFIG_E1000E_SEPARATE_TX_HANDLER | |
93 | EOF | |
94 | # add -DE1000E_NO_NAPI to disable NAPI | |
95 | ||
96 | %build | |
97 | %build_kernel_modules -C src -m %{pname} | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | %install_kernel_modules -m src/%{pname} -d kernel/drivers/net -n %{pname} -s current | |
102 | # blacklist kernel module | |
103 | cat > $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf <<'EOF' | |
104 | blacklist e1000e | |
105 | alias e1000e e1000e-current | |
106 | EOF | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post -n kernel%{_alt_kernel}-net-%{pname} | |
112 | %depmod %{_kernel_ver} | |
113 | ||
114 | %postun -n kernel%{_alt_kernel}-net-%{pname} | |
115 | %depmod %{_kernel_ver} | |
116 | ||
117 | %files -n kernel%{_alt_kernel}-net-%{pname} | |
118 | %defattr(644,root,root,755) | |
119 | %doc e1000e.7 README | |
120 | /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf | |
121 | /lib/modules/%{_kernel_ver}/kernel/drivers/net/%{pname}*.ko* |