- no gzip modules.
[packages/e1000.git] / e1000.spec
CommitLineData
5672dc74
JB
1#
2# Conditional build:
c259e077
JB
3%bcond_without dist_kernel # without distribution kernel
4%bcond_without smp # don't build SMP module
5672dc74 5#
67b3197c 6%define no_install_post_strip 1
7
6b39b5a2 8%define _orig_name e1000
c259e077 9%define _mod_name e1000%{?with_dist_kernel:_intel}
6c20349f 10
6b39b5a2
PG
11Summary: Intel(R) PRO/1000 driver for Linux
12Summary(pl): Sterownik do karty Intel(R) PRO/1000
13Name: kernel-net-%{_orig_name}
f0ce1b74 14Version: 5.7.6
3d27cef4 15%define _rel 2
24e60443 16Release: %{_rel}@%{_kernel_ver_str}
6b39b5a2
PG
17License: BSD
18Vendor: Intel Corporation
19Group: Base/Kernel
e67e8464 20Source0: ftp://aiedownload.intel.com/df-support/2897/eng/%{_orig_name}-%{version}.tar.gz
f0ce1b74 21# Source0-md5: 1e64bc52552527837b4a83e15e70a35d
c259e077 22%{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.0}
6b39b5a2 23BuildRequires: %{kgcc_package}
5f5a9fa5 24BuildRequires: rpmbuild(macros) >= 1.118
3c4d4ad2 25URL: http://support.intel.com/support/network/adapter/index.htm#PRO/1000
c259e077 26%{?with_dist_kernel:%requires_releq_kernel_up}
5672dc74
JB
27Requires(post,postun): /sbin/depmod
28Provides: kernel(e1000)
6b39b5a2
PG
29Obsoletes: e1000
30Obsoletes: linux-net-e1000
6b39b5a2
PG
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
fbba5257
PG
34This package contains the Linux driver for the Intel(R) PRO/1000
35family of 10/100/1000 Ethernet network adapters.
6b39b5a2
PG
36
37%description -l pl
fbba5257
PG
38Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych
3910/100/1000Mbit z rodziny Intel(R) PRO/1000.
6b39b5a2
PG
40
41%package -n kernel-smp-net-%{_orig_name}
42Summary: Intel(R) PRO/1000 driver for Linux SMP
43Summary(pl): Sterownik do karty Intel(R) PRO/1000
44Release: %{_rel}@%{_kernel_ver_str}
45Group: Base/Kernel
c259e077 46%{?with_dist_kernel:%requires_releq_kernel_smp}
5672dc74
JB
47Requires(post,postun): /sbin/depmod
48Provides: kernel(e1000)
6b39b5a2
PG
49Obsoletes: e1000
50Obsoletes: linux-net-e1000
6b39b5a2
PG
51
52%description -n kernel-smp-net-%{_orig_name}
53This package contains the Linux SMP driver for the Intel(R) PRO/1000
54family of 10/100/1000 Ethernet network adapters.
55
56%description -n kernel-smp-net-%{_orig_name} -l pl
57Ten pakiet zawiera sterownik dla Linuksa SMP do kart sieciowych
5810/100/1000Mbit z rodziny Intel(R) PRO/1000.
59
60%prep
61%setup -q -n %{_orig_name}-%{version}
62
63%build
76f1612f 64cd src
65for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
66 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
67 exit 1
68 fi
69 rm -rf include
70 install -d include/{linux,config}
71 ln -sf %{_kernelsrcdir}/config-$cfg .config
72 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
73 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
74 touch include/config/MARKER
75 %{__make} -C %{_kernelsrcdir} clean modules \
76 EXTRA_CFLAGS="-I../include -DFUSE_VERSION='1.1'" \
77 RCS_FIND_IGNORE="-name '*.ko' -o" \
78 M=$PWD O=$PWD \
79 %{?with_verbose:V=1}
3d27cef4 80 mv e1000{,-$cfg}.ko
76f1612f 81done
3d27cef4 82
6b39b5a2
PG
83%install
84rm -rf $RPM_BUILD_ROOT
3d27cef4
SP
85
86install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/net/misc
87install src/e1000-up.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/net/misc/e1000.ko
88%if %{with smp} && %{with dist_kernel}
89install src/e1000-smp.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/misc/e1000.ko
90%endif
6b39b5a2 91
fbba5257 92%clean
6b39b5a2
PG
93rm -rf $RPM_BUILD_ROOT
94
95%post
5f5a9fa5 96%depmod %{_kernel_ver}
6b39b5a2
PG
97
98%postun
5f5a9fa5 99%depmod %{_kernel_ver}
6b39b5a2 100
5672dc74 101%post -n kernel-smp-net-%{_orig_name}
5f5a9fa5 102%depmod %{_kernel_ver}smp
6b39b5a2
PG
103
104%postun -n kernel-smp-net-%{_orig_name}
5f5a9fa5 105%depmod %{_kernel_ver}smp
6b39b5a2
PG
106
107%files
108%defattr(644,root,root,755)
cdde7fde 109%doc %{_orig_name}.7 README ldistrib.txt
6c20349f 110/lib/modules/%{_kernel_ver}/kernel/drivers/net/misc/*
6b39b5a2
PG
111
112%files -n kernel-smp-net-%{_orig_name}
113%defattr(644,root,root,755)
cdde7fde 114%doc %{_orig_name}.7 README ldistrib.txt
6c20349f 115/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/misc/*
This page took 0.050647 seconds and 4 git commands to generate.