- 2.6 now - updated deps; fixed bconds
[packages/e1000.git] / e1000.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  smp             # don't build SMP module
5 #
6 %define         _orig_name      e1000
7 %define         _mod_name       e1000%{?with_dist_kernel:_intel}
8
9 Summary:        Intel(R) PRO/1000 driver for Linux
10 Summary(pl):    Sterownik do karty Intel(R) PRO/1000
11 Name:           kernel-net-%{_orig_name}
12 Version:        5.5.4
13 %define _rel    1
14 Release:        %{_rel}@%{_kernel_ver_str}
15 License:        BSD
16 Vendor:         Intel Corporation
17 Group:          Base/Kernel
18 Source0:        ftp://aiedownload.intel.com/df-support/2897/eng/%{_orig_name}-%{version}.tar.gz
19 # Source0-md5:  f6e55d5f3a112dca04397e62d720ef84
20 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.0}
21 BuildRequires:  %{kgcc_package}
22 BuildRequires:  rpmbuild(macros) >= 1.118
23 URL:            http://support.intel.com/support/network/adapter/pro100/
24 %{?with_dist_kernel:%requires_releq_kernel_up}
25 Requires(post,postun):  /sbin/depmod
26 Provides:       kernel(e1000)
27 Obsoletes:      e1000
28 Obsoletes:      linux-net-e1000
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 This package contains the Linux driver for the Intel(R) PRO/1000
33 family of 10/100/1000 Ethernet network adapters.
34
35 %description -l pl
36 Ten pakiet zawiera sterownik dla Linuksa do kart sieciowych
37 10/100/1000Mbit z rodziny Intel(R) PRO/1000.
38
39 %package -n kernel-smp-net-%{_orig_name}
40 Summary:        Intel(R) PRO/1000 driver for Linux SMP
41 Summary(pl):    Sterownik do karty Intel(R) PRO/1000
42 Release:        %{_rel}@%{_kernel_ver_str}
43 Group:          Base/Kernel
44 %{?with_dist_kernel:%requires_releq_kernel_smp}
45 Requires(post,postun):  /sbin/depmod
46 Provides:       kernel(e1000)
47 Obsoletes:      e1000
48 Obsoletes:      linux-net-e1000
49
50 %description -n kernel-smp-net-%{_orig_name}
51 This package contains the Linux SMP driver for the Intel(R) PRO/1000
52 family of 10/100/1000 Ethernet network adapters.
53
54 %description -n kernel-smp-net-%{_orig_name} -l pl
55 Ten pakiet zawiera sterownik dla Linuksa SMP do kart sieciowych
56 10/100/1000Mbit z rodziny Intel(R) PRO/1000.
57
58 %prep
59 %setup -q -n %{_orig_name}-%{version}
60
61 %build
62 cd src
63 for 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
79 done
80                                                                 
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/misc
84 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/net/misc
85 install src/%{_orig_name}.ko-smp $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/misc/%{_mod_name}.ko
86 install src/%{_orig_name}.ko-up $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/net/misc/%{_mod_name}.ko
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post
92 %depmod %{_kernel_ver}
93
94 %postun
95 %depmod %{_kernel_ver}
96
97 %post   -n kernel-smp-net-%{_orig_name}
98 %depmod %{_kernel_ver}smp
99
100 %postun -n kernel-smp-net-%{_orig_name}
101 %depmod %{_kernel_ver}smp
102
103 %files
104 %defattr(644,root,root,755)
105 %doc %{_orig_name}.7 README ldistrib.txt
106 /lib/modules/%{_kernel_ver}/kernel/drivers/net/misc/*
107
108 %files -n kernel-smp-net-%{_orig_name}
109 %defattr(644,root,root,755)
110 %doc %{_orig_name}.7 README ldistrib.txt
111 /lib/modules/%{_kernel_ver}smp/kernel/drivers/net/misc/*
This page took 0.043159 seconds and 3 git commands to generate.