- updated to 7.0.38
[packages/e1000.git] / e1000.spec
CommitLineData
5672dc74
JB
1#
2# Conditional build:
69dc5a49 3%bcond_without dist_kernel # allow non-distribution kernel
c259e077 4%bcond_without smp # don't build SMP module
69dc5a49 5%bcond_with verbose # verbose build (V=1)
5672dc74 6#
fc821d83 7%define _rel 1
6b39b5a2
PG
8Summary: Intel(R) PRO/1000 driver for Linux
9Summary(pl): Sterownik do karty Intel(R) PRO/1000
69dc5a49 10Name: kernel-net-e1000
960655bb 11Version: 7.0.38
24e60443 12Release: %{_rel}@%{_kernel_ver_str}
69dc5a49 13License: GPL v2
6b39b5a2 14Group: Base/Kernel
48c0c2ff 15Source0: ftp://aiedownload.intel.com/df-support/9180/eng/e1000-%{version}.tar.gz
960655bb 16# Source0-md5: 1c1c8b63e1530a68c5c73c4a39cb218b
3c4d4ad2 17URL: http://support.intel.com/support/network/adapter/index.htm#PRO/1000
fc821d83 18%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
69dc5a49 19BuildRequires: rpmbuild(macros) >= 1.211
5672dc74 20Requires(post,postun): /sbin/depmod
69dc5a49
PS
21%if %{with dist_kernel}
22%requires_releq_kernel_up
23Requires(postun): %releq_kernel_up
24%endif
5672dc74 25Provides: kernel(e1000)
6b39b5a2
PG
26Obsoletes: e1000
27Obsoletes: linux-net-e1000
6b39b5a2
PG
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
fbba5257
PG
31This package contains the Linux driver for the Intel(R) PRO/1000
32family of 10/100/1000 Ethernet network adapters.
6b39b5a2
PG
33
34%description -l pl
fbba5257
PG
35Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych
3610/100/1000Mbit z rodziny Intel(R) PRO/1000.
6b39b5a2 37
69dc5a49 38%package -n kernel-smp-net-e1000
6b39b5a2
PG
39Summary: Intel(R) PRO/1000 driver for Linux SMP
40Summary(pl): Sterownik do karty Intel(R) PRO/1000
41Release: %{_rel}@%{_kernel_ver_str}
42Group: Base/Kernel
5672dc74 43Requires(post,postun): /sbin/depmod
69dc5a49
PS
44%if %{with dist_kernel}
45%requires_releq_kernel_smp
46Requires(postun): %releq_kernel_smp
47%endif
5672dc74 48Provides: kernel(e1000)
6b39b5a2
PG
49Obsoletes: e1000
50Obsoletes: linux-net-e1000
6b39b5a2 51
69dc5a49 52%description -n kernel-smp-net-e1000
6b39b5a2
PG
53This package contains the Linux SMP driver for the Intel(R) PRO/1000
54family of 10/100/1000 Ethernet network adapters.
55
69dc5a49 56%description -n kernel-smp-net-e1000 -l pl
6b39b5a2
PG
57Ten pakiet zawiera sterownik dla Linuksa SMP do kart sieciowych
5810/100/1000Mbit z rodziny Intel(R) PRO/1000.
59
60%prep
69dc5a49 61%setup -q -n e1000-%{version}
6b39b5a2
PG
62
63%build
76f1612f 64cd src
65for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
69dc5a49
PS
66 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
67 exit 1
68 fi
6611b76c
AG
69 rm -rf o
70 install -d o/include/{linux,config}
71 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
72 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
73 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
01be4042
SP
74%ifarch ppc
75 if [ -d "%{_kernelsrcdir}/include/asm-powerpc" ]; then
76 install -d include/asm
6611b76c
AG
77 cp -a %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* o/include/asm
78 cp -a %{_kernelsrcdir}/include/asm-powerpc/* o/include/asm
01be4042 79 else
6611b76c 80 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} o/include/asm
01be4042
SP
81 fi
82%else
6611b76c 83 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} o/include/asm
01be4042 84%endif
69dc5a49 85
6611b76c 86cat >o/Makefile <<EOF
69dc5a49
PS
87obj-m := e1000i.o
88e1000i-objs := e1000_main.o e1000_hw.o e1000_param.o e1000_ethtool.o kcompat.o
89EOF
90
6611b76c 91 %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
69dc5a49
PS
92 %{__make} -C %{_kernelsrcdir} clean \
93 RCS_FIND_IGNORE="-name '*.ko' -o" \
6611b76c 94 M=$PWD O=$PWD/o \
69dc5a49
PS
95 %{?with_verbose:V=1}
96 %{__make} -C %{_kernelsrcdir} modules \
01be4042 97%if "%{_target_base_arch}" != "%{_arch}"
fc821d83
ER
98 ARCH=%{_target_base_arch} \
99 CROSS_COMPILE=%{_target_cpu}-pld-linux- \
01be4042 100%endif
fc821d83 101 HOSTCC="%{__cc}" \
69dc5a49 102 EXTRA_CFLAGS='-DE1000_NAPI' \
6611b76c 103 M=$PWD O=$PWD/o \
69dc5a49
PS
104 %{?with_verbose:V=1}
105
6611b76c 106 mv e1000{,i-$cfg}.ko
76f1612f 107done
3d27cef4 108
6b39b5a2
PG
109%install
110rm -rf $RPM_BUILD_ROOT
3d27cef4 111
69dc5a49
PS
112install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/net
113cd src
114install e1000i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
115 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/net/e1000i.ko
3d27cef4 116%if %{with smp} && %{with dist_kernel}
69dc5a49
PS
117install e1000i-smp.ko \
118 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/e1000i.ko
3d27cef4 119%endif
69dc5a49 120cd ..
6b39b5a2 121
fbba5257 122%clean
6b39b5a2
PG
123rm -rf $RPM_BUILD_ROOT
124
125%post
5f5a9fa5 126%depmod %{_kernel_ver}
6b39b5a2
PG
127
128%postun
5f5a9fa5 129%depmod %{_kernel_ver}
6b39b5a2 130
69dc5a49 131%post -n kernel-smp-net-e1000
5f5a9fa5 132%depmod %{_kernel_ver}smp
6b39b5a2 133
69dc5a49 134%postun -n kernel-smp-net-e1000
5f5a9fa5 135%depmod %{_kernel_ver}smp
6b39b5a2
PG
136
137%files
138%defattr(644,root,root,755)
69dc5a49
PS
139%doc e1000.7 README ldistrib.txt
140/lib/modules/%{_kernel_ver}/kernel/drivers/net/*
6b39b5a2 141
3a91d8ce 142%if %{with smp} && %{with dist_kernel}
69dc5a49 143%files -n kernel-smp-net-e1000
6b39b5a2 144%defattr(644,root,root,755)
69dc5a49
PS
145%doc e1000.7 README ldistrib.txt
146/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/*
3a91d8ce 147%endif
This page took 0.11081 seconds and 4 git commands to generate.