/[smeserver]/builds_bin/macros
ViewVC logotype

Diff of /builds_bin/macros

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.3 by slords, Thu Dec 7 16:27:24 2006 UTC Revision 1.5 by slords, Thu Dec 28 23:41:39 2006 UTC
# Line 22  Line 22 
22  %evr %{?epoch:%{epoch}:}%{version}-%{release}  %evr %{?epoch:%{epoch}:}%{version}-%{release}
23    
24  %_kversion %(ls /usr/src/kernels/ | sed -n 's|^\\([^-]\\+-[^-]\\+\\)-.*|\\1|p' | tail -1)  %_kversion %(ls /usr/src/kernels/ | sed -n 's|^\\([^-]\\+-[^-]\\+\\)-.*|\\1|p' | tail -1)
25    
26    %kmdl_kernelsrcdir() /usr/src/kernels/%{_kversion}%{?1:-%1}-%{_target_cpu}
27    %kmdl_moduledir() /lib/modules/%{_kversion}%{?1}/updates
28    
29    %_with_smp %(test -d %{kmdl_kernelsrcdir smp} && echo 1 || echo 0)
30    %_with_hugemem %(test -d %{kmdl_kernelsrcdir hugemem} && echo 1 || echo 0)
31    %_with_largesmp %(test -d %{kmdl_kernelsrcdir largesmp} && echo 1 || echo 0)
32    %_with_xen0 %(test -d %{kmdl_kernelsrcdir xen0} && echo 1 || echo 0)
33    %_with_xenU %(test -d %{kmdl_kernelsrcdir xenU} && echo 1 || echo 0)
34    %_with_xen %(test -d %{kmdl_kernelsrcdir xen} && echo 1 || echo 0)
35    
36    %kmdl \
37    %kmdl_kernel \
38    %kmdl_kernel smp \
39    %kmdl_kernel hugemem \
40    %kmdl_kernel largesmp \
41    %kmdl_kernel xen0 \
42    %kmdl_kernel xenU \
43    %kmdl_kernel xen
44    
45    %kmdl_kernel() \
46    %{?1:%{expand:%%if %%{_with_%1}}} \
47    %package kmdl-%{_kversion}%{?1} \
48    Summary: %{name} kernel%{?1:-%1} module(s) \
49    Group: System Environment/Kernel \
50    BuildRequires: gcc \
51    BuildRequires: kernel%{?1:-%1}-devel = %{_kversion} \
52    Requires: /sbin/depmod \
53    Requires: /boot/vmlinuz-%{_kversion}%{?1} \
54    Requires: kernel%{?1:-%1}-%{_target_cpu} = %{_kversion} \
55    Obsoletes: kmod-%{name}%{?1:-%1} \
56    Obsoletes: kernel%{?1:-%1}-module-%{name} \
57    Provides: %{name}-kmdl-%{evr} \
58    Provides: %{name}-kmdl-%{_kversion}%{?1} = %{evr} \
59    %description kmdl-%{_kversion}%{?1} \
60    This package provides the %{name} kernel modules built for the Linux \
61    kernel %{_kversion}%{?1} for the %{_target_cpu} family of processors. \
62    %post kmdl-%{_kversion}%{?1} \
63    depmod -aeF /boot/System.map-%{_kversion}%%{?1} %{_kversion}%%{?1} > /dev/null 2>&1 || : \
64    %postun kmdl-%{_kversion}%{?1} \
65    depmod -aeF /boot/System.map-%{_kversion}%%{?1} %{_kversion}%%{?1} > /dev/null 2>&1 || : \
66    %files kmdl-%{_kversion}%{?1} \
67    %defattr(-, root, root, -) \
68    %{expand:%%{kmdl_moduledir %{?1}}} \
69    %{?1:%endif} \
70    %{nil}
71    
72    #---------------------------------------------------------------------
73    
74  %_krelver %(echo "%{_kversion}" | sed -e 's|-|_|g')  %_krelver %(echo "%{_kversion}" | sed -e 's|-|_|g')
75    
76  %kmod_kernelsrcdir() %(echo "/usr/src/kernels/%{_kversion}-%{?1}-%{_target_cpu}" | sed -e's|--|-|')  %kmod_kernelsrcdir() %(echo "/usr/src/kernels/%{_kversion}-%{?1}-%{_target_cpu}" | sed -e's|--|-|')
77  %kmod_moduledir() /lib/modules/%{_kversion}%{?1}/updates  %kmod_moduledir() /lib/modules/%{_kversion}%{?1}/updates
78    
 %_with_smp %(test -d %{kmod_kernelsrcdir smp} && echo 1 || echo 0)  
 %_with_hugemem %(test -d %{kmod_kernelsrcdir hugemem} && echo 1 || echo 0)  
   
79  %kmod() \  %kmod() \
80  %{expand:%%global _kmodname %1} \  %{expand:%%global _kmodname %1} \
81  %{expand:%%global _kmodversion %2} \  %{expand:%%global _kmodversion %2} \
# Line 41  Packager: %{_packager} \ Line 87  Packager: %{_packager} \
87  License: GPL \  License: GPL \
88  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(id -u -n)-root  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(id -u -n)-root
89    
90    %kmod_kernel() \
91    %{expand:%%if %%{_with_%1}}\
92    %package %1 \
93    %{expand:%%kmod_dependencies %1} \
94    %{expand:%%kmod_desc %1} \
95    %{expand:%%kmod_scripts %1} \
96    %files %1 \
97    %defattr(-, root, root, -) \
98    %{expand:%%kmod_moduledir %1} \
99    %endif \
100    %{nil}
101    
102  %kmod_dependencies() \  %kmod_dependencies() \
103  Summary: %{_kmodname} kernel module(s) \  Summary: %{_kmodname} kernel module(s) \
104  Group: System Environment/Kernel \  Group: System Environment/Kernel \


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed