aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-04-08 10:20:08 -0700
committerBrian Behlendorf <[email protected]>2011-04-08 10:20:08 -0700
commit96cdefab84061e807f54ed17b93e0586393f9448 (patch)
tree9c29e2c520c6a83898439d9fc37c6fd4406eb19e
parenta40c3fca6f6c8765c09d007283d0957a0b71dead (diff)
Fix rebuildable RPMs for el6/ch5
When rebuilding the source RPM under el5 you need to append the target_cpu. However, under el6/ch5 things are packaged correctly and the arch is already part of kver. For this reason it also needs to be stripped from kver when setting kverpkg.
-rw-r--r--spl-modules.spec.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/spl-modules.spec.in b/spl-modules.spec.in
index 76dcfa643..e02d6c255 100644
--- a/spl-modules.spec.in
+++ b/spl-modules.spec.in
@@ -94,14 +94,18 @@
%endif
%define kpkg kernel
%define kdevpkg kernel-devel
- %if %{defined el6}
+ %if %{defined el6} || %{defined ch5}
%define kverpkg %(echo %{kver} | %{__sed} -e 's/.%{_target_cpu}//g')
%else
%define kverpkg %{kver}
%endif
%define koppkg =
%if %{undefined kdir}
- %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu}
+ %if %{defined el6} || %{defined ch5}
+ %define kdir %{_usrsrc}/kernels/%{kver}
+ %else
+ %define kdir %{_usrsrc}/kernels/%{kver}-%{_target_cpu}
+ %endif
%endif
%if %{undefined kobj}
%define kobj %{kdir}