[packages/kernel] - added versuffix macro for easy future branching
baggins
baggins at pld-linux.org
Wed Feb 19 22:25:54 CET 2014
commit e865f3ecbc0f4edd40569cc2a29d25847ba93957
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Feb 19 22:25:37 2014 +0100
- added versuffix macro for easy future branching
kernel.spec | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index de80ada..a3012d1 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -70,6 +70,9 @@
%define basever 3.13
%define postver .3
+# define this to '-%{basever}' for longterm branch
+%define versuffix %{nil}
+
# __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)
@@ -101,7 +104,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%{versuffix}%{_alt_kernel}
Version: %{basever}%{postver}
Release: %{rel}
Epoch: 3
@@ -352,7 +355,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%{versuffix}%{_alt_kernel}-%{version}
%if "%{_target_base_arch}" != "%{_host_base_arch}"
%define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
@@ -1194,13 +1197,13 @@ fi
%depmod %{kernel_release}
%post headers
-ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
+ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{versuffix}%{_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%{versuffix}%{_alt_kernel} ]; then
+ if [ "$(readlink %{_prefix}/src/linux%{versuffix}%{_alt_kernel})" = "linux%{versuffix}%{_alt_kernel}-%{version}" ]; then
+ rm -f %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
fi
fi
fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/e865f3ecbc0f4edd40569cc2a29d25847ba93957
More information about the pld-cvs-commit
mailing list