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