summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian J. Murrell <[email protected]>2010-03-08 15:12:22 -0800
committerBrian Behlendorf <[email protected]>2010-03-08 15:16:55 -0800
commit3cce0f13652dd3476cb6939df2656631b2dee4b8 (patch)
treed13925ac001874bc0868eea413eeb98daec70208
parent534c4e38cb2e070e8502798e3eecf297ff82f480 (diff)
Fix definitions for the unknown distro/installation
If the distro/installation really is unsupported (i.e. unknown) we should not make it look like a known distribution (i.e. RHEL) complete with dependencies on other RPMs and trying to find kenrel source in the RH standard location. Additionally add 'k' prefix for kernel requires for consistency.
-rw-r--r--spl-modules.spec.in23
1 files changed, 16 insertions, 7 deletions
diff --git a/spl-modules.spec.in b/spl-modules.spec.in
index 4f8d47acc..92b12abf4 100644
--- a/spl-modules.spec.in
+++ b/spl-modules.spec.in
@@ -125,14 +125,11 @@
# Unsupported distro:
%if %{undefined kver}
- %define kver X
+ %define kver %(uname -r)
%endif
- %define kpkg kernel
- %define kdevpkg kernel-devel
%define kverpkg %{kver}
- %define koppkg =
%if %{undefined kdir}
- %define kdir %{_usrsrc}/kernels/%{kver}
+ %define kdir /lib/modules/%{kver}/build
%endif
%if %{undefined kobj}
%define kobj %{kdir}
@@ -159,9 +156,13 @@
%else
%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g')
%define release @SPL_META_RELEASE@_%{relext}
-%define requires %{kpkg} %{koppkg} %{kverpkg}
+%if %{defined kpkg}
+%define krequires %{kpkg} %{koppkg} %{kverpkg}
+%endif
+%if %{defined kdevpkg}
%define devel_requires %{kdevpkg} %{koppkg} %{kverpkg}
%endif
+%endif
Summary: Solaris Porting Layer Modules
Group: Utilities/System
@@ -172,8 +173,12 @@ License: @LICENSE@
URL: git://eris.llnl.gov/spl.git
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
Source: @PACKAGE@-%{version}.tar.gz
-Requires: %{requires}
+%if %{defined krequires}
+Requires: %{krequires}
+%endif
+%if %{defined kdevpkg}
BuildRequires: %{kdevpkg}
+%endif
%description
The %{name} package contains kernel modules for emulating Solaris style
@@ -184,8 +189,12 @@ taskq, thread, time, and vnode APIs.
%package devel
Summary: Solaris Porting Layer Headers and Symbols
Group: Development/Libraries
+%if %{defined devel_requires}
Requires: %{devel_requires}
+%endif
+%if %{defined kdevpkg}
BuildRequires: %{kdevpkg}
+%endif
%description devel
The %{name}-devel package contains the header files and Module{s}.symvers