]> git.pld-linux.org Git - packages/igb.git/blob - igb.spec
- igb module for Ac 2.6.16
[packages/igb.git] / igb.spec
1 # Conditional build:
2 %bcond_without  dist_kernel     # allow non-distribution kernel
3 %bcond_without  kernel          # don't build kernel modules
4 %bcond_without  smp             # don't build SMP module
5 %bcond_without  up              # don't build UP module
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     1
20 %define         pname   igb
21 Summary:        Intel(R) PRO/1000 driver for Linux
22 Summary(pl.UTF-8):      Sterownik do karty Intel(R) PRO/1000
23 Name:           %{pname}%{_alt_kernel}
24 Version:        2.4.12
25 Release:        %{rel}
26 License:        GPL v2
27 Group:          Base/Kernel
28 Source0:        http://dl.sourceforge.net/e1000/%{pname}-%{version}.tar.gz
29 # Source0-md5:  32d898732dce0f0ea4d94f068ab59608
30 URL:            http://sourceforge.net/projects/e1000/
31 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.10}
32 BuildRequires:  rpmbuild(macros) >= 1.379
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 This package contains the Linux driver for the Intel(R) PRO/1000
37 adapters with 82575EB/GB or 82576 chipsets.
38
39 %description -l pl.UTF-8
40 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
41 Intel(R) PRO/1000 opartych o układy 82575EB/GB lub 82576.
42
43 %package -n kernel%{_alt_kernel}-net-igb
44 Summary:        Intel(R) PRO/1000 driver for Linux
45 Summary(pl.UTF-8):      Sterownik do karty Intel(R) PRO/1000
46 Release:        %{rel}@%{_kernel_ver_str}
47 Group:          Base/Kernel
48 Requires(post,postun):  /sbin/depmod
49 %if %{with dist_kernel}
50 %requires_releq_kernel
51 Requires(postun):       %releq_kernel
52 %endif
53
54 %description -n kernel%{_alt_kernel}-net-igb
55 This package contains the Linux driver for the Intel(R) PRO/1000
56 adapters with 82575EB/GB or 82576 chipsets.
57
58 %description -n kernel%{_alt_kernel}-net-igb -l pl.UTF-8
59 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
60 Intel(R) PRO/1000 opartych o układy 82575EB/GB lub 82576.
61
62 %package -n kernel%{_alt_kernel}-smp-net-igb
63 Summary:        Intel(R) PRO/1000 driver for Linux SMP
64 Summary(pl.UTF-8):      Sterownik do karty Intel(R) PRO/1000
65 Release:        %{rel}@%{_kernel_ver_str}
66 Group:          Base/Kernel
67 Requires(post,postun):  /sbin/depmod
68 %if %{with dist_kernel}
69 %requires_releq_kernel
70 Requires(postun):       %releq_kernel
71 %endif
72
73 %description -n kernel%{_alt_kernel}-smp-net-igb
74 This package contains the Linux driver for the Intel(R) PRO/1000
75 adapters with 82575EB/GB or 82576 chipsets.
76
77 %description -n kernel%{_alt_kernel}-smp-net-igb -l pl.UTF-8
78 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
79 Intel(R) PRO/1000 opartych o układy 82575EB/GB lub 82576.
80
81 %prep
82 %setup -q -n %{pname}-%{version}
83 cat > src/Makefile <<'EOF'
84 obj-m := igb.o
85 igb-objs := igb_main.o e1000_82575.o e1000_mac.o e1000_nvm.o e1000_phy.o \
86 e1000_manage.o igb_param.o igb_ethtool.o kcompat.o e1000_api.o e1000_mbx.o
87
88 EXTRA_CFLAGS=-DDRIVER_IGB
89 EOF
90
91 # Large Receive Offload - Do Not Use LRO When Routing Packets
92 # CFLAGS_EXTRA=-DIGB_LRO
93
94 %build
95 %build_kernel_modules -C src -m %{pname}
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{_mandir}/man7
100
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 igb
105 alias igb igb-current
106 EOF
107
108 cp -a igb.7 $RPM_BUILD_ROOT%{_mandir}/man7
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %post   -n kernel%{_alt_kernel}-net-igb
114 %depmod %{_kernel_ver}
115
116 %post   -n kernel%{_alt_kernel}-smp-net-igb
117 %depmod %{_kernel_ver}
118
119 %postun -n kernel%{_alt_kernel}-net-igb
120 %depmod %{_kernel_ver}
121
122 %postun -n kernel%{_alt_kernel}-smp-net-igb
123 %depmod %{_kernel_ver}
124
125 %if %{with up}
126 %files  -n kernel%{_alt_kernel}-net-igb
127 %defattr(644,root,root,755)
128 %doc README
129 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
130 /lib/modules/%{_kernel_ver}/kernel/drivers/net/%{pname}*.ko*
131 %{_mandir}/man7/igb.7*
132 %endif
133
134 %if %{with smp}
135 %files  -n kernel%{_alt_kernel}-smp-net-igb
136 %defattr(644,root,root,755)
137 %doc README
138 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
139 /lib/modules/%{_kernel_ver}smp/kernel/drivers/net/%{pname}*.ko*
140 %{_mandir}/man7/igb.7*
141 %endif
This page took 0.096487 seconds and 4 git commands to generate.