From af971a8594bd8c472b301c0d194addae5fc56397 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 26 Jun 2009 10:34:40 -0700 Subject: [PATCH] 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 --- spl.spec.in | 55 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/spl.spec.in b/spl.spec.in index 3922f93..408158f 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -18,49 +18,70 @@ %if %{defined sles_version} %if %{undefined kver} %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease 2>/dev/null) | tail -1) - %endif + %define kver %((echo unknown; %{__cat} %{klnk}/.kernelrelease + 2>/dev/null) | tail -1) + %endif %define kpkg kernel-%{_target_cpu} %define kdevpkg kernel-source kernel-syms %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) - %{!?kdir: %define kdir %{_usrsrc}/linux-%{kverpkg}} - %{!?kobj: %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu}} + %if %{undefined kdir} + %define kdir %{_usrsrc}/linux-%{kverpkg} + %endif + %if %{undefined kobj} + %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} + %endif # CHAOS4: %else %if %{defined ch4} %if %{undefined kver} %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release 2>/dev/null) | tail -1) - %endif + %define kver %((echo unknown; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif %define kpkg chaos-kernel %define kdevpkg chaos-kernel-devel %define kverpkg %{kver} - %{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} - %{!?kobj: %define kobj %{kdir}} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif # RHEL*/Fedora: %else %if %{defined fedora} || %{defined rhel} %if %{undefined kver} %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 %define kpkg kernel %define kdevpkg kernel-devel %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) - %{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} - %{!?kobj: %define kobj %{kdir}} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif %else # Unsupported distro: -%{!?kver: %define kver unknown} -%define kpkg kernel -%define kdevpkg kernel-devel -%define kverpkg %{kver} -%{!?kdir: %define kdir %{_usrsrc}/kernels/%{kver}} -%{!?kobj: %define kobj %{kdir}} + %if %{undefined kver} + %define kver unknown + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %{kver} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif %endif %endif -- 2.40.0