]> git.pld-linux.org Git - packages/igb.git/blob - igb.spec
- typo
[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:   kernel%{_alt_kernel}-smp(vermagic) = %{_kernel_ver}
70 %endif
71
72 %description -n kernel%{_alt_kernel}-smp-net-igb
73 This package contains the Linux driver for the Intel(R) PRO/1000
74 adapters with 82575EB/GB or 82576 chipsets.
75
76 %description -n kernel%{_alt_kernel}-smp-net-igb -l pl.UTF-8
77 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
78 Intel(R) PRO/1000 opartych o układy 82575EB/GB lub 82576.
79
80 %prep
81 %setup -q -n %{pname}-%{version}
82 cat > src/Makefile <<'EOF'
83 obj-m := igb.o
84 igb-objs := igb_main.o e1000_82575.o e1000_mac.o e1000_nvm.o e1000_phy.o \
85 e1000_manage.o igb_param.o igb_ethtool.o kcompat.o e1000_api.o e1000_mbx.o
86
87 EXTRA_CFLAGS=-DDRIVER_IGB
88 EOF
89
90 # Large Receive Offload - Do Not Use LRO When Routing Packets
91 # CFLAGS_EXTRA=-DIGB_LRO
92
93 %build
94 %build_kernel_modules -C src -m %{pname}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_mandir}/man7
99
100 %install_kernel_modules -m src/%{pname} -d kernel/drivers/net -n %{pname} -s current
101 # blacklist kernel module
102 cat > $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf <<'EOF'
103 blacklist igb
104 alias igb igb-current
105 EOF
106
107 cp -a igb.7 $RPM_BUILD_ROOT%{_mandir}/man7
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post   -n kernel%{_alt_kernel}-net-igb
113 %depmod %{_kernel_ver}
114
115 %post   -n kernel%{_alt_kernel}-smp-net-igb
116 %depmod %{_kernel_ver}smp
117
118 %postun -n kernel%{_alt_kernel}-net-igb
119 %depmod %{_kernel_ver}
120
121 %postun -n kernel%{_alt_kernel}-smp-net-igb
122 %depmod %{_kernel_ver}smp
123
124 %if %{with up}
125 %files  -n kernel%{_alt_kernel}-net-igb
126 %defattr(644,root,root,755)
127 %doc README
128 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
129 /lib/modules/%{_kernel_ver}/kernel/drivers/net/%{pname}*.ko*
130 %{_mandir}/man7/igb.7*
131 %endif
132
133 %if %{with smp}
134 %files  -n kernel%{_alt_kernel}-smp-net-igb
135 %defattr(644,root,root,755)
136 %doc README
137 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
138 /lib/modules/%{_kernel_ver}smp/kernel/drivers/net/%{pname}*.ko*
139 %{_mandir}/man7/igb.7*
140 %endif
This page took 0.029883 seconds and 3 git commands to generate.