Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-09-03 16:16:22 +0200
committerMichal Marek <mmarek@suse.cz>2014-09-03 16:16:22 +0200
commit2ab65856e31615961771d3a3f9ec60b3ef0e6eec (patch)
tree96d3ba5285db1b18ba16a2f9389def183536411c
parent90bc0f1c2238b9aec5a78d9c76dc9663e8fa0316 (diff)
parent9b6a6fe6db2df01e068a4df61d61c301fa2d9848 (diff)
Merge branch 'packaging' into stable
-rw-r--r--rpm/kernel-source.spec.in31
1 files changed, 26 insertions, 5 deletions
diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in
index 3f04ba67a7..ac474bd13e 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"
@@ -199,16 +212,18 @@ fi
%install
%if ! %vanilla_only
# Install the documentation and example Kernel Module Package.
-DOC=$RPM_BUILD_ROOT/usr/share/doc/packages/%name
-mkdir -p $DOC
-cp %_sourcedir/README.SUSE %_sourcedir/config-options.changes.txt $DOC
-ln -s /usr/share/doc/packages/%name/README.SUSE %buildroot/%src_install_dir/
+DOC=/usr/share/doc/packages/%name-%kernelrelease
+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" \
@@ -240,11 +255,17 @@ find %buildroot/usr/src/linux* ! -type l | xargs touch -d "$ts"
%files -n kernel-devel%variant -f devel.files
%defattr(-,root,root)
%ghost /usr/src/linux%variant
-/usr/share/doc/packages/%name
+%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