3 %bcond_without dist_kernel # without distribution kernel
5 %define _orig_name 3c990
7 Summary: Linux driver for the 3Com 3C990 Network Interface Cards
8 Summary(pl.UTF-8): Sterownik dla Linuksa do kart sieciowych 3Com 3C990
9 Name: kernel-net-%{_orig_name}
12 Release: %{_rel}@%{_kernel_ver_str}
15 Source0: http://support.3com.com/infodeli/tools/nic/linux/%{_orig_name}-%{version}.tar.gz
16 # Source0-md5: e7597b2747a18f0cfe7bc81e83a2bc68
17 Patch0: %{_orig_name}-redefine.patch
18 %{?with_dist_kernel:BuildRequires: kernel-headers }
19 BuildRequires: %{kgcc_package}
20 BuildRequires: rpmbuild(macros) >= 1.118
21 %{?with_dist_kernel:%requires_releq_kernel_up}
22 Requires(post,postun): /sbin/depmod
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 This driver (3c990.c) has been written to work with the 3c990 product
27 line of network cards, manufactured by 3Com Corp.
29 This driver is not intended for any other product line, including the
30 3c59x or 3c90x product lines (although drivers with both of these
31 names, and for both of these product lines, are available).
33 %description -l pl.UTF-8
34 Sterownik dla Linuksa do kart sieciowych 3Com 3c990.
36 Nie obsługuje kart serii 3c59x i 3c90x, istnieją inne sterowniki do
39 %package -n kernel-smp-net-%{_orig_name}
40 Summary: Linux SMP driver for the 3Com 3C990 Network Interface Cards
41 Summary(pl.UTF-8): Sterownik dla Linuksa SMP dla kart sieciowych 3Com 3C990
42 Release: %{_rel}@%{_kernel_ver_str}
44 %{?with_dist_kernel:%requires_releq_kernel_smp}
45 Requires(post,postun): /sbin/depmod
47 %description -n kernel-smp-net-%{_orig_name}
48 This driver (3c990.c) has been written to work with the 3c990 product
49 line of network cards, manufactured by 3Com Corp on SMP systems.
51 This driver is not intended for any other product line, including the
52 3c59x or 3c90x product lines (although drivers with both of these
53 names, and for both of these product lines, are available).
55 %description -n kernel-smp-net-%{_orig_name} -l pl.UTF-8
56 Sterownik dla Linuksa SMP do kart sieciowych 3Com 3c990.
58 Nie obsługuje kart serii 3c59x i 3c90x, istnieją inne sterowniki do
62 %setup -q -n %{_orig_name}-%{version} -c
67 %{kgcc} -o %{_orig_name}.o -c %{rpmcflags} -c -DMODULE -D__KERNEL__ -O2 -DSMP=1 -D__SMP__ -DCONFIG_X86_LOCAL_APIC -Wall -Wstrict-prototypes -I%{_kernelsrcdir}/include %{_orig_name}.c
68 mv -f %{_orig_name}.o %{_orig_name}-smp.o
69 %{kgcc} -o %{_orig_name}.o -c %{rpmcflags} -c -DMODULE -D__KERNEL__ -O2 -Wall -Wstrict-prototypes -I%{_kernelsrcdir}/include %{_orig_name}.c
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
75 install %{_orig_name}-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/%{_orig_name}.o
76 install %{_orig_name}.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/%{_orig_name}.o
79 rm -rf $RPM_BUILD_ROOT
82 %depmod %{_kernel_ver}
85 %depmod %{_kernel_ver}
87 %post -n kernel-smp-net-%{_orig_name}
88 %depmod %{_kernel_ver}smp
90 %postun -n kernel-smp-net-%{_orig_name}
91 %depmod %{_kernel_ver}smp
94 %defattr(644,root,root,755)
96 /lib/modules/%{_kernel_ver}/misc/*
98 %files -n kernel-smp-net-%{_orig_name}
99 %defattr(644,root,root,755)
101 /lib/modules/%{_kernel_ver}smp/misc/*