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