[packages/kernel/LINUX_3_10] - add basever to package name in a way it can be used as alt_kernel for external modules; this als

baggins baggins at pld-linux.org
Wed Feb 19 22:16:27 CET 2014


commit fb1cfee953d7e74ccc13d7ee0185d7d694604cf3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Feb 19 22:16:07 2014 +0100

    - add basever to package name in a way it can be used as alt_kernel for
      external modules; this also prevents polluting 'uname -r` with vasever

 kernel.spec | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index fbb6880..4e3ea65 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -74,7 +74,7 @@
 # __alt_kernel is list of features, empty string if none set
 # _alt kernel is defined as: %{nil}%{?alt_kernel:-%{?alt_kernel}} (defined in rpm.macros)
 # alt_kernel should be defined if __alt_kernel has non-empty value (for %{?alt_kernel:foo} constructs)
-%define		__alt_kernel	%{basever}
+%define		__alt_kernel	%{nil}
 
 %if "%{__alt_kernel}" != ""
 %define		alt_kernel	%{__alt_kernel}
@@ -102,7 +102,7 @@ Summary(de.UTF-8):	Der Linux-Kernel (Kern des Linux-Betriebssystems)
 Summary(et.UTF-8):	Linuxi kernel (ehk operatsioonisüsteemi tuum)
 Summary(fr.UTF-8):	Le Kernel-Linux (La partie centrale du systeme)
 Summary(pl.UTF-8):	Jądro Linuksa
-Name:		kernel%{_alt_kernel}
+Name:		kernel-%{basever}%{_alt_kernel}
 Version:	%{basever}%{postver}
 Release:	%{rel}
 Epoch:		3
@@ -362,7 +362,7 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		objdir		%{topdir}/%{targetobj}
 %define		targetobj	%{_target_base_arch}-gcc-%(%{__cc} -dumpversion)
 
-%define		_kernelsrcdir	/usr/src/linux%{_alt_kernel}-%{version}
+%define		_kernelsrcdir	/usr/src/linux-%{basever}%{_alt_kernel}-%{version}
 
 %if "%{_target_base_arch}" != "%{_host_base_arch}"
 	%define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
@@ -1213,13 +1213,13 @@ fi
 %depmod %{kernel_release}
 
 %post headers
-ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
+ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux-%{basever}%{_alt_kernel}
 
 %postun headers
 if [ "$1" = "0" ]; then
-	if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
-		if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
-			rm -f %{_prefix}/src/linux%{_alt_kernel}
+	if [ -L %{_prefix}/src/linux-%{basever}%{_alt_kernel} ]; then
+		if [ "$(readlink %{_prefix}/src/linux-%{basever}%{_alt_kernel})" = "linux-%{basever}%{_alt_kernel}-%{version}" ]; then
+			rm -f %{_prefix}/src/linux-%{basever}%{_alt_kernel}
 		fi
 	fi
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/fb1cfee953d7e74ccc13d7ee0185d7d694604cf3



More information about the pld-cvs-commit mailing list