summaryrefslogtreecommitdiffstats
path: root/spl.spec.in
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-06-26 11:37:06 -0700
committerBrian Behlendorf <[email protected]>2009-06-26 11:37:06 -0700
commitac12b26284a15ba8985c845a0511448435c3f065 (patch)
tree86cf0f7feacc0ab2558f8f732dec2fc175204c3d /spl.spec.in
parentaf971a8594bd8c472b301c0d194addae5fc56397 (diff)
Simplify the kernel depenency logic
Diffstat (limited to 'spl.spec.in')
-rw-r--r--spl.spec.in35
1 files changed, 15 insertions, 20 deletions
diff --git a/spl.spec.in b/spl.spec.in
index 408158fc2..0243dc430 100644
--- a/spl.spec.in
+++ b/spl.spec.in
@@ -88,28 +88,23 @@
%endif
# Distro agnostic:
-%define debug_package %{nil}
-
-%define name @PACKAGE@
-%define version @VERSION@
-
-# The kernel version should only be appended to a binary RPM.
-# When building a source RPM it must be kernel version agnostic.
+%define name @PACKAGE@
+%define version @VERSION@
+%define debug_package %{nil}
+
+# The kernel version should only be appended to a binary RPM. When
+# building a source RPM it must be kernel version agnostic. This means
+# the source RPM must never specify a required kernel version, but the
+# final RPM should be keyed to the kernel version it was built against.
%if %{defined build_src_rpm}
-%define release @SPL_META_RELEASE@
-%else
-%define release @SPL_META_RELEASE@_%(echo %{kverpkg} | %{__sed} -e 's/-/_/g')
-%endif
-
-# Required by mock to ensure valid 'Requires' and 'BuildRequires' fields
-# are set even when a specific kernel version was not requested. This is
-# used when mock is attempting to rebuild the srpm for the latest kernel.
-%if %{defined require_kver}
-%define requires %{kpkg}=%{kverpkg}
-%define buildrequires %{kdevpkg}=%{kverpkg}
+%define release @SPL_META_RELEASE@
+%define requires %{kpkg}
+%define buildrequires %{kdevpkg}
%else
-%define requires %{kpkg}
-%define buildrequires %{kdevpkg}
+%define release @SPL_META_RELEASE@_%(echo %{kverpkg} |
+ %{__sed} -e 's/-/_/g')
+%define requires %{kpkg} = %{kverpkg}
+%define buildrequires %{kdevpkg} = %{kverpkg}
%endif
Summary: Solaris Porting Layer