]>
Commit | Line | Data |
---|---|---|
50ec253d | 1 | # Conditional build: |
50ec253d | 2 | %bcond_with verbose # verbose build (V=1) |
3 | ||
059680c3 JR |
4 | # nothing to be placed to debuginfo package |
5 | %define _enable_debug_packages 0 | |
6 | ||
2e39cca3 | 7 | %define rel 1 |
50ec253d | 8 | %define pname ixgbe |
aa371a67 | 9 | Summary: Intel(R) 10 Gigabit driver for Linux |
10 | Summary(pl.UTF-8): Sterownik do karty Intel(R) 10 Gigabit | |
50ec253d | 11 | Name: %{pname}%{_alt_kernel} |
3c927ab3 | 12 | Version: 4.1.2 |
059680c3 | 13 | Release: %{rel}@%{_kernel_ver_str} |
50ec253d | 14 | License: GPL v2 |
15 | Group: Base/Kernel | |
4dd5ebc0 | 16 | Source0: http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz |
3c927ab3 | 17 | # Source0-md5: 191f7b0f31596cc0edc7e870ca05d037 |
9127317a | 18 | Patch0: linux-4.1.patch |
3c927ab3 | 19 | Patch1: linux-4.2.patch |
50ec253d | 20 | URL: http://sourceforge.net/projects/e1000/ |
f05fb15a JR |
21 | %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2} |
22 | BuildRequires: rpmbuild(macros) >= 1.701 | |
50ec253d | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | This package contains the Linux driver for the Intel(R) 10 Gigabit | |
be42ab64 | 27 | adapters with 82598EB chipset. |
50ec253d | 28 | |
29 | %description -l pl.UTF-8 | |
87dbbcf7 | 30 | Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny |
be42ab64 | 31 | Intel(R) 10 Gigabit opartych o układ 82598EB. |
50ec253d | 32 | |
059680c3 JR |
33 | %define kernel_pkg()\ |
34 | %package -n kernel%{_alt_kernel}-net-ixgbe\ | |
35 | Summary: Intel(R) 10 Gigabit driver for Linux\ | |
36 | Summary(pl.UTF-8): Sterownik do karty Intel(R) 10 Gigabit\ | |
37 | Release: %{rel}@%{_kernel_ver_str}\ | |
38 | Group: Base/Kernel\ | |
39 | Requires(post,postun): /sbin/depmod\ | |
059680c3 JR |
40 | %requires_releq_kernel\ |
41 | Requires(postun): %releq_kernel\ | |
059680c3 JR |
42 | \ |
43 | %description -n kernel%{_alt_kernel}-net-ixgbe\ | |
44 | This package contains the Linux driver for the Intel(R) 10 Gigabit\ | |
45 | adapters with 82598EB chipset.\ | |
46 | \ | |
47 | %description -n kernel%{_alt_kernel}-net-ixgbe -l pl.UTF-8\ | |
48 | Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny\ | |
49 | Intel(R) 10 Gigabit opartych o układ 82598EB.\ | |
50 | \ | |
51 | %files -n kernel%{_alt_kernel}-net-ixgbe\ | |
52 | %defattr(644,root,root,755)\ | |
53 | %doc ixgbe.7 README\ | |
54 | /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf\ | |
55 | /lib/modules/%{_kernel_ver}/kernel/drivers/net/%{pname}*.ko*\ | |
56 | \ | |
57 | %post -n kernel%{_alt_kernel}-net-ixgbe\ | |
58 | %depmod %{_kernel_ver}\ | |
59 | \ | |
60 | %postun -n kernel%{_alt_kernel}-net-ixgbe\ | |
61 | %depmod %{_kernel_ver}\ | |
62 | %{nil} | |
63 | ||
64 | %define build_kernel_pkg()\ | |
65 | %build_kernel_modules -C src -m %{pname}\ | |
66 | %install_kernel_modules -D installed -m src/%{pname} -d kernel/drivers/net -n %{pname} -s current\ | |
67 | %{nil} | |
68 | ||
69 | %define install_kernel_pkg()\ | |
70 | install -d $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}\ | |
71 | # blacklist kernel module\ | |
72 | cat > $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf <<'EOF'\ | |
73 | blacklist ixgbe\ | |
74 | alias ixgbe ixgbe-current\ | |
75 | EOF\ | |
76 | %{nil} | |
77 | ||
f05fb15a | 78 | %{expand:%create_kernel_packages} |
50ec253d | 79 | |
80 | %prep | |
81 | %setup -q -n %{pname}-%{version} | |
9127317a | 82 | %patch0 -p1 |
3c927ab3 | 83 | %patch1 -p1 |
42492750 | 84 | |
746efd47 | 85 | cp src/Makefile src/Makefile.%{name} |
50ec253d | 86 | cat > src/Makefile <<'EOF' |
87 | obj-m := ixgbe.o | |
493ddae8 | 88 | ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_api.o ixgbe_param.o \ |
746efd47 | 89 | ixgbe_lib.o ixgbe_ethtool.o kcompat.o ixgbe_82598.o \ |
5843d8bd | 90 | ixgbe_82599.o ixgbe_ptp.o ixgbe_x540.o ixgbe_x550.o ixgbe_sriov.o \ |
746efd47 PG |
91 | ixgbe_mbx.o ixgbe_dcb.o ixgbe_dcb_82598.o ixgbe_dcb_82599.o \ |
92 | ixgbe_sysfs.o ixgbe_procfs.o ixgbe_phy.o ixgbe_fcoe.o \ | |
9127317a | 93 | ixgbe_dcb_nl.o ixgbe_debugfs.o |
50ec253d | 94 | |
d8ab7bbe JR |
95 | EXTRA_CFLAGS+=-DDRIVER_IXGBE |
96 | EXTRA_CFLAGS+=-DIXGBE_PTP | |
50ec253d | 97 | EOF |
98 | ||
99 | %build | |
f05fb15a | 100 | %{expand:%build_kernel_packages} |
50ec253d | 101 | |
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
059680c3 JR |
104 | install -d $RPM_BUILD_ROOT |
105 | ||
f05fb15a | 106 | %{expand:%install_kernel_packages} |
059680c3 | 107 | cp -a installed/* $RPM_BUILD_ROOT |
50ec253d | 108 | |
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT |