[packages/kernel/LINUX_3_4] - build -doc and -source as noarch

glen glen at pld-linux.org
Thu Apr 3 23:05:30 CEST 2014

commit f8e031bba80b69db095e8ec0795a0a36c0d1f5c0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Dec 28 18:08:52 2012 +0200

    - build -doc and -source as noarch

 kernel.spec | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/kernel.spec b/kernel.spec
index 6ffe8c2..744be93 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -614,6 +614,9 @@ Summary(pl.UTF-8):	Kod źródłowy jądra Linuksa
 Group:		Development/Building
 Requires:	%{name}-module-build = %{epoch}:%{version}-%{release}
 AutoReqProv:	no
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
 %description source
 This is the source code for the Linux kernel. You can build a custom
@@ -644,6 +647,9 @@ Summary(de.UTF-8):	Kernel Dokumentation
 Summary(pl.UTF-8):	Dokumentacja do jądra Linuksa
 Group:		Documentation
 AutoReqProv:	no
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
 %description doc
 This is the documentation for the Linux kernel, as found in
@@ -1127,14 +1133,18 @@ for f in `find %{objdir}/scripts -type f -print | grep -v "/\.\|\.o$"` ; do
 	cp -a "$f" "$RPM_BUILD_ROOT%{_kernelsrcdir}/$ff"
+%if %{with doc}
 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
 install -d $RPM_BUILD_ROOT%{_docdir}
 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
-rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
-rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
-rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
-rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
+%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
+%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
+%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
+%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
+%{__rm} -r $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation

---- gitweb:


More information about the pld-cvs-commit mailing list