]> git.pld-linux.org Git - packages/ixgbe.git/blob - ixgbe.spec
- up to 4.1.2
[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.2
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:  191f7b0f31596cc0edc7e870ca05d037
18 Patch0:         linux-4.1.patch
19 Patch1:         linux-4.2.patch
20 URL:            http://sourceforge.net/projects/e1000/
21 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
22 BuildRequires:  rpmbuild(macros) >= 1.701
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
27 adapters with 82598EB chipset.
28
29 %description -l pl.UTF-8
30 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych z rodziny
31 Intel(R) 10 Gigabit opartych o układ 82598EB.
32
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\
40 %requires_releq_kernel\
41 Requires(postun):       %releq_kernel\
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
78 %{expand:%create_kernel_packages}
79
80 %prep
81 %setup -q -n %{pname}-%{version}
82 %patch0 -p1
83 %patch1 -p1
84
85 cp src/Makefile src/Makefile.%{name}
86 cat > src/Makefile <<'EOF'
87 obj-m := ixgbe.o
88 ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_api.o ixgbe_param.o \
89 ixgbe_lib.o ixgbe_ethtool.o kcompat.o ixgbe_82598.o \
90 ixgbe_82599.o ixgbe_ptp.o ixgbe_x540.o ixgbe_x550.o ixgbe_sriov.o \
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 \
93 ixgbe_dcb_nl.o ixgbe_debugfs.o
94
95 EXTRA_CFLAGS+=-DDRIVER_IXGBE
96 EXTRA_CFLAGS+=-DIXGBE_PTP
97 EOF
98
99 %build
100 %{expand:%build_kernel_packages}
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT
105
106 %{expand:%install_kernel_packages}
107 cp -a installed/* $RPM_BUILD_ROOT
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
This page took 0.037444 seconds and 4 git commands to generate.