]> git.pld-linux.org Git - packages/bcm5700.git/blob - bcm5700.spec
- fixed depmod in %%post and %%postun when build with _without_dist_kernel
[packages/bcm5700.git] / bcm5700.spec
1 #
2 # Conditional build:
3 # _without_dist_kernel          without distribution kernel
4 #
5 %define         _orig_name      bcm5700
6
7 Summary:        Linux driver for the 3Com Gigabit Server BCM5700 (3c996) Network Interface Cards
8 Summary(pl):    Sterownik dla Linuksa do kart sieciowych gigabit ethernet BCM5700 (3c996)
9 Name:           kernel-net-%{_orig_name}
10 Version:        2.2.27
11 %define _rel    1
12 Release:        %{_rel}@%{_kernel_ver_str}
13 License:        GPL
14 Group:          Base/Kernel
15 Source0:        http://support.3com.com/infodeli/tools/nic/linux/%{_orig_name}-%{version}.tar.gz
16 URL:            http://support.3com.com/infodeli/tools/nic/linuxdownload.htm
17 %{!?_without_dist_kernel:BuildRequires:         kernel-headers }
18 BuildRequires:  %{kgcc_package}
19 %{!?_without_dist_kernel:%requires_releq_kernel_up}
20 Requires(post,postun):  /sbin/depmod
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Linux driver for the 3Com Gigabit Server BCM5700 (3c996) Network
25 Interface Cards.
26
27 %description -l pl
28 Sterownik dla Linuksa do kart sieciowych gigabit ethernet BCM5700
29 (3c996). ObsĀ³uguje karty o symbolach 3c996B-T i 3c996-SX.
30
31 %package -n kernel-smp-net-%{_orig_name}
32 Summary:        Linux SMP driver for the 3Com Gigabit Server BCM5700 (3c996) Network Interface Cards
33 Summary(pl):    Sterownik dla Linuksa SMP do kart sieciowych gigabit ethernet BCM5700 (3c996)
34 Release:        %{_rel}@%{_kernel_ver_str}
35 Group:          Base/Kernel
36 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
37 Requires(post,postun):  /sbin/depmod
38
39 %description -n kernel-smp-net-%{_orig_name}
40 Linux SMP driver for the 3Com Gigabit Server BCM5700 (3c996) Network
41 Interface Cards.
42
43 %description -n kernel-smp-net-%{_orig_name} -l pl
44 Sterownik dla Linuksa do kart sieciowych gigabit ethernet BCM5700
45 (3c996). ObsĀ³uguje karty o symbolach 3c996B-T i 3c996-SX.
46
47 %prep
48 %setup -q -n %{_orig_name}-%{version} -c
49
50 %build
51 cd src
52 %{__make} CC="%{kgcc} %{rpmcflags} -Wall -I%{_kernelsrcdir}/include -D__SMP__ -DCONFIG_X86_LOCAL_APIC"
53 mv -f %{_orig_name}.o ../%{_orig_name}-smp.o
54 %{__make} clean
55 %{__make} CC="%{kgcc} %{rpmcflags} -Wall -I%{_kernelsrcdir}/include"
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
60 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
61 install -d $RPM_BUILD_ROOT%{_mandir}/man4
62 install %{_orig_name}-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/%{_orig_name}.o
63 install src/%{_orig_name}.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/%{_orig_name}.o
64 install src/%{_orig_name}.4.gz $RPM_BUILD_ROOT%{_mandir}/man4
65
66 %clean 
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
71
72 %postun
73 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
74
75 %post   -n kernel-smp-net-%{_orig_name}
76 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
77
78 %postun -n kernel-smp-net-%{_orig_name}
79 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
80
81 %files
82 %defattr(644,root,root,755)
83 %doc RELEASE.TXT
84 /lib/modules/%{_kernel_ver}/misc/*
85 %{_mandir}/man?/*
86
87 %files -n kernel-smp-net-%{_orig_name}
88 %defattr(644,root,root,755)
89 %doc RELEASE.TXT 
90 /lib/modules/%{_kernel_ver}smp/misc/*
91 %{_mandir}/man?/*
This page took 0.051064 seconds and 3 git commands to generate.