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