Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-09-03 13:37:45 +0200
committerMichal Marek <mmarek@suse.cz>2014-09-03 13:50:30 +0200
commit9b6a6fe6db2df01e068a4df61d61c301fa2d9848 (patch)
treee54b48eb7dd3a3093610228ca9053eb0b68bcdbf
parentdeb25bccc7af701754572e3320ca62b5355d5d76 (diff)
rpm/kernel-source.spec.in: Create a kernel-macros package with the KMP macros
This package does not have multiversion(kernel) and is not built in the -rt tree (bnc#867595).
-rw-r--r--rpm/kernel-source.spec.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in
index a7b270d5e5..5dbd68c3f2 100644
--- a/rpm/kernel-source.spec.in
+++ b/rpm/kernel-source.spec.in
@@ -132,13 +132,25 @@ Group: Development/Sources
AutoReqProv: off
Provides: kernel-devel%variant = %version-%source_rel
Provides: multiversion(kernel)
+Requires: kernel-macros
%description -n kernel-devel%variant
Kernel-level headers and Makefiles required for development of
external kernel modules.
+%source_timestamp
+
+%package -n kernel-macros
+Summary: RPM macros for building Kernel Module Packages
+Group: Development/Sources
+# Note: This does not provide multiversion(kernel) nor is its name decorated
+# with the variant (-rt)
+
+%description -n kernel-macros
+This package provides the rpm macros and templates for Kernel Module Pakcages
%source_timestamp
+
%package vanilla
Summary: Vanilla Linux kernel sources with minor build fixes.
Group: Development/Sources
@@ -151,6 +163,7 @@ Vanilla Linux kernel sources with minor build fixes.
%source_timestamp
+
%prep
echo "Symbol(s): %symbols"
@@ -204,11 +217,13 @@ mkdir -p %buildroot/$DOC
cp %_sourcedir/README.SUSE %_sourcedir/config-options.changes.txt %buildroot/$DOC
ln -s $DOC/README.SUSE %buildroot/%src_install_dir/
+%if "%variant" == ""
install -m 755 -d $RPM_BUILD_ROOT/etc/rpm
install -m 644 %_sourcedir/macros.kernel-source $RPM_BUILD_ROOT/etc/rpm/
install -m 755 -d $RPM_BUILD_ROOT/usr/lib/rpm
install -m 644 %_sourcedir/kernel-{module,cert}-subpackage \
$RPM_BUILD_ROOT/usr/lib/rpm/
+%endif
for script in post; do
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
@@ -241,10 +256,16 @@ find %buildroot/usr/src/linux* ! -type l | xargs touch -d "$ts"
%defattr(-,root,root)
%ghost /usr/src/linux%variant
%doc /usr/share/doc/packages/*
+
+%if "%variant" == ""
+%files -n kernel-macros
+%defattr(-,root,root)
/etc/rpm/macros.kernel-source
/usr/lib/rpm/kernel-*-subpackage
%endif
+%endif
+
%if %do_vanilla
%files vanilla