# Conditional build:
-%bcond_without dist_kernel # allow non-distribution kernel
%bcond_with verbose # verbose build (V=1)
-%if "%{_alt_kernel}" != "%{nil}"
-%if 0%{?build_kernels:1}
-%{error:alt_kernel and build_kernels are mutually exclusive}
-exit 1
-%endif
-%global _build_kernels %{alt_kernel}
-%else
-%global _build_kernels %{?build_kernels:,%{?build_kernels}}
-%endif
-
# nothing to be placed to debuginfo package
%define _enable_debug_packages 0
-%define kpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
-%define bkpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
-%define ikpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%install_kernel_pkg ; done)
-
%define rel 1
%define pname ixgbe
Summary: Intel(R) 10 Gigabit driver for Linux
Summary(pl.UTF-8): Sterownik do karty Intel(R) 10 Gigabit
Name: %{pname}%{_alt_kernel}
-Version: 3.21.2
+Version: 4.1.2
Release: %{rel}@%{_kernel_ver_str}
License: GPL v2
Group: Base/Kernel
Source0: http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz
-# Source0-md5: dc635736d7e0ef5373131753f6609f38
+# Source0-md5: 191f7b0f31596cc0edc7e870ca05d037
+Patch0: linux-4.1.patch
+Patch1: linux-4.2.patch
URL: http://sourceforge.net/projects/e1000/
-%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
-BuildRequires: rpmbuild(macros) >= 1.678
+%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
+BuildRequires: rpmbuild(macros) >= 1.701
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Release: %{rel}@%{_kernel_ver_str}\
Group: Base/Kernel\
Requires(post,postun): /sbin/depmod\
-%if %{with dist_kernel}\
%requires_releq_kernel\
Requires(postun): %releq_kernel\
-%endif\
\
%description -n kernel%{_alt_kernel}-net-ixgbe\
This package contains the Linux driver for the Intel(R) 10 Gigabit\
EOF\
%{nil}
-%{expand:%kpkg}
+%{expand:%create_kernel_packages}
%prep
%setup -q -n %{pname}-%{version}
+%patch0 -p1
+%patch1 -p1
+
cp src/Makefile src/Makefile.%{name}
cat > src/Makefile <<'EOF'
obj-m := ixgbe.o
ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_api.o ixgbe_param.o \
ixgbe_lib.o ixgbe_ethtool.o kcompat.o ixgbe_82598.o \
-ixgbe_82599.o ixgbe_ptp.o ixgbe_x540.o ixgbe_sriov.o \
+ixgbe_82599.o ixgbe_ptp.o ixgbe_x540.o ixgbe_x550.o ixgbe_sriov.o \
ixgbe_mbx.o ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_82599.o \
ixgbe_sysfs.o ixgbe_procfs.o ixgbe_phy.o ixgbe_fcoe.o \
-ixgbe_dcb_nl.o ixgbe_dcb_nl.o ixgbe_debugfs.o
+ixgbe_dcb_nl.o ixgbe_debugfs.o
EXTRA_CFLAGS+=-DDRIVER_IXGBE
EXTRA_CFLAGS+=-DIXGBE_PTP
EOF
%build
-%{expand:%bkpkg}
+%{expand:%build_kernel_packages}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT
-%{expand:%ikpkg}
+%{expand:%install_kernel_packages}
cp -a installed/* $RPM_BUILD_ROOT
%clean