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