]> git.pld-linux.org Git - packages/igb.git/blob - igb.spec
- rebuild for kernel-3.7.9-2
[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_with     verbose         # verbose build (V=1)
5
6 %ifarch sparc
7 %undefine       with_smp
8 %endif
9
10 %if %{without kernel}
11 %undefine with_dist_kernel
12 %endif
13 %if "%{_alt_kernel}" != "%{nil}"
14 %undefine       with_userspace
15 %endif
16
17 %define         rel     7
18 %define         pname   igb
19 Summary:        Intel(R) PRO/1000 driver for Linux
20 Summary(pl.UTF-8):      Sterownik do karty Intel(R) PRO/1000
21 Name:           %{pname}%{_alt_kernel}
22 Version:        4.1.2
23 Release:        %{rel}
24 License:        GPL v2
25 Group:          Base/Kernel
26 Source0:        http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz
27 # Source0-md5:  0a5462b76310b83a40c9023edae50d72
28 URL:            http://sourceforge.net/projects/e1000/
29 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
30 BuildRequires:  rpmbuild(macros) >= 1.379
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This package contains the Linux driver for the Intel(R) PRO/1000
35 adapters with 82575EB/GB or 82576 chipsets.
36
37 %description -l pl.UTF-8
38 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
39 Intel(R) PRO/1000 opartych o układy 82575EB/GB lub 82576.
40
41 %package -n kernel%{_alt_kernel}-net-igb
42 Summary:        Intel(R) PRO/1000 driver for Linux
43 Summary(pl.UTF-8):      Sterownik do karty Intel(R) PRO/1000
44 Release:        %{rel}@%{_kernel_ver_str}
45 Group:          Base/Kernel
46 Requires(post,postun):  /sbin/depmod
47 %if %{with dist_kernel}
48 %requires_releq_kernel
49 Requires(postun):       %releq_kernel
50 %endif
51
52 %description -n kernel%{_alt_kernel}-net-igb
53 This package contains the Linux driver for the Intel(R) PRO/1000
54 adapters with 82575EB/GB or 82576 chipsets.
55
56 %description -n kernel%{_alt_kernel}-net-igb -l pl.UTF-8
57 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
58 Intel(R) PRO/1000 opartych o układy 82575EB/GB lub 82576.
59
60 %prep
61 %setup -q -n %{pname}-%{version}
62 cat > src/Makefile <<'EOF'
63 obj-m := igb.o
64 igb-objs := igb_main.o e1000_82575.o e1000_i210.o e1000_mac.o e1000_nvm.o e1000_phy.o \
65         e1000_manage.o igb_param.o igb_ethtool.o kcompat.o e1000_api.o \
66         e1000_mbx.o igb_vmdq.o igb_sysfs.o igb_procfs.o igb_ptp.o
67
68 EXTRA_CFLAGS += -DDRIVER_IGB
69 EXTRA_CFLAGS += -DDRIVER_NAME=igb
70 EXTRA_CFLAGS += -DDRIVER_NAME_CAPS=IGB
71 EOF
72
73 %build
74 %build_kernel_modules -C src -m %{pname}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT%{_mandir}/man7
79
80 %install_kernel_modules -m src/%{pname} -d kernel/drivers/net -n %{pname} -s current
81 # blacklist kernel module
82 cat > $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf <<'EOF'
83 blacklist igb
84 alias igb igb-current
85 EOF
86
87 cp -a igb.7 $RPM_BUILD_ROOT%{_mandir}/man7
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post   -n kernel%{_alt_kernel}-net-igb
93 %depmod %{_kernel_ver}
94
95 %postun -n kernel%{_alt_kernel}-net-igb
96 %depmod %{_kernel_ver}
97
98 %files  -n kernel%{_alt_kernel}-net-igb
99 %defattr(644,root,root,755)
100 %doc README
101 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
102 /lib/modules/%{_kernel_ver}/kernel/drivers/net/%{pname}*.ko*
103 %{_mandir}/man7/igb.7*
This page took 0.036313 seconds and 3 git commands to generate.