]> git.pld-linux.org Git - packages/ixgbe.git/blob - ixgbe.spec
- fix build with linux 3.7
[packages/ixgbe.git] / ixgbe.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     10
18 %define         pname   ixgbe
19 Summary:        Intel(R) 10 Gigabit driver for Linux
20 Summary(pl.UTF-8):      Sterownik do karty Intel(R) 10 Gigabit
21 Name:           %{pname}%{_alt_kernel}
22 Version:        3.11.33
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:  7b512003c112680adda402c6c88e8cbf
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) 10 Gigabit
36 adapters with 82598EB chipset.
37
38 %description -l pl.UTF-8
39 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
40 Intel(R) 10 Gigabit opartych o układ 82598EB.
41
42 %package -n kernel%{_alt_kernel}-net-ixgbe
43 Summary:        Intel(R) 10 Gigabit driver for Linux
44 Summary(pl.UTF-8):      Sterownik do karty Intel(R) 10 Gigabit
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-ixgbe
54 This package contains the Linux driver for the Intel(R) 10 Gigabit
55 adapters with 82598EB chipset.
56
57 %description -n kernel%{_alt_kernel}-net-ixgbe -l pl.UTF-8
58 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
59 Intel(R) 10 Gigabit opartych o układ 82598EB.
60
61 %prep
62 %setup -q -n %{pname}-%{version}
63 %patch0 -p1
64 cp src/Makefile src/Makefile.%{name}
65 cat > src/Makefile <<'EOF'
66 obj-m := ixgbe.o
67 ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_api.o ixgbe_param.o \
68 ixgbe_lib.o ixgbe_ethtool.o kcompat.o ixgbe_82598.o \
69 ixgbe_82599.o ixgbe_ptp.o ixgbe_x540.o ixgbe_sriov.o \
70 ixgbe_mbx.o ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_82599.o \
71 ixgbe_sysfs.o ixgbe_procfs.o ixgbe_phy.o ixgbe_fcoe.o \
72 ixgbe_dcb_nl.o
73
74 EXTRA_CFLAGS=-DDRIVER_IXGBE
75 EOF
76
77 %build
78 %build_kernel_modules -C src -m %{pname}
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
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 ixgbe
86 alias ixgbe ixgbe-current
87 EOF
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post   -n kernel%{_alt_kernel}-net-ixgbe
93 %depmod %{_kernel_ver}
94
95 %postun -n kernel%{_alt_kernel}-net-ixgbe
96 %depmod %{_kernel_ver}
97
98 %files  -n kernel%{_alt_kernel}-net-ixgbe
99 %defattr(644,root,root,755)
100 %doc ixgbe.7 README
101 /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
102 /lib/modules/%{_kernel_ver}/kernel/drivers/net/%{pname}*.ko*
This page took 0.06309 seconds and 4 git commands to generate.