Spec file update, for some reason the following shorthand syntax

was failing so it was replaced with the longer %if version.

%{!?foo: %define foo bar}

changed to

%if %{undefined foo}
 %define foo bar
%endif
This commit is contained in:
Brian Behlendorf 2009-06-26 10:34:40 -07:00
parent e28bc9160d
commit af971a8594

View File

@ -18,49 +18,70 @@
%if %{defined sles_version} %if %{defined sles_version}
%if %{undefined kver} %if %{undefined kver}
%define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu}
%define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease 2>/dev/null) | tail -1) %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease
%endif 2>/dev/null) | tail -1)
%endif
%define kpkg kernel-%{_target_cpu} %define kpkg kernel-%{_target_cpu}
%define kdevpkg kernel-source kernel-syms %define kdevpkg kernel-source kernel-syms
%define kverpkg %(echo %{kver} | cut -d'-' -f1-2) %define kverpkg %(echo %{kver} | cut -d'-' -f1-2)
%{!?kdir: %define kdir %{_usrsrc}/linux-%{kverpkg}} %if %{undefined kdir}
%{!?kobj: %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu}} %define kdir %{_usrsrc}/linux-%{kverpkg}
%endif
%if %{undefined kobj}
%define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu}
%endif
# CHAOS4: # CHAOS4:
%else %else
%if %{defined ch4} %if %{defined ch4}
%if %{undefined kver} %if %{undefined kver}
%define klnk %{_usrsrc}/kernels/*/include/config %define klnk %{_usrsrc}/kernels/*/include/config
%define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release
%endif 2>/dev/null) | tail -1)
%endif
%define kpkg chaos-kernel %define kpkg chaos-kernel
%define kdevpkg chaos-kernel-devel %define kdevpkg chaos-kernel-devel
%define kverpkg %{kver} %define kverpkg %{kver}
%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} %if %{undefined kdir}
%{!?kobj: %define kobj %{kdir}} %define kdir %{_usrsrc}/kernels/%{kver}
%endif
%if %{undefined kobj}
%define kobj %{kdir}
%endif
# RHEL*/Fedora: # RHEL*/Fedora:
%else %else
%if %{defined fedora} || %{defined rhel} %if %{defined fedora} || %{defined rhel}
%if %{undefined kver} %if %{undefined kver}
%define klnk %{_usrsrc}/kernels/*/include/config %define klnk %{_usrsrc}/kernels/*/include/config
%define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release
2>/dev/null) | tail -1)
%endif %endif
%define kpkg kernel %define kpkg kernel
%define kdevpkg kernel-devel %define kdevpkg kernel-devel
%define kverpkg %(echo %{kver} | cut -d'.' -f1-7) %define kverpkg %(echo %{kver} | cut -d'.' -f1-7)
%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} %if %{undefined kdir}
%{!?kobj: %define kobj %{kdir}} %define kdir %{_usrsrc}/kernels/%{kver}
%endif
%if %{undefined kobj}
%define kobj %{kdir}
%endif
%else %else
# Unsupported distro: # Unsupported distro:
%{!?kver: %define kver unknown} %if %{undefined kver}
%define kpkg kernel %define kver unknown
%define kdevpkg kernel-devel %endif
%define kverpkg %{kver} %define kpkg kernel
%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} %define kdevpkg kernel-devel
%{!?kobj: %define kobj %{kdir}} %define kverpkg %{kver}
%if %{undefined kdir}
%define kdir %{_usrsrc}/kernels/%{kver}
%endif
%if %{undefined kobj}
%define kobj %{kdir}
%endif
%endif %endif
%endif %endif