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