mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
Merge r7378 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7638 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2,18 +2,8 @@
|
||||
# kversion: Kernel version as it appears under /lib/modules.
|
||||
# The algorithm for setting the variable kversion is as follows:
|
||||
# - If the variable kversion has been set, use its value.
|
||||
# - If an RPM with the name kernel-headers exists (RHEL / CentOS), use the
|
||||
# version number of the kernel that package is based on. This provides the
|
||||
# version number when building on a koji build server.
|
||||
# - Otherwise use the version number of the running kernel.
|
||||
%{!?kversion:%define kversion %{expand:%%(
|
||||
if rpm --quiet -q kernel-headers; then
|
||||
rpm -q --qf '%%%%{version}-%%%%{release}.%%%%{arch}\\n' \\
|
||||
kernel-headers | head -n1;
|
||||
else
|
||||
uname -r;
|
||||
fi
|
||||
)}}
|
||||
%{!?kversion:%define kversion %{expand:%%(uname -r)}}
|
||||
%{echo:kversion=%{kversion}
|
||||
}
|
||||
# kernel_rpm: Name of the kernel RPM if the kernel is available as an RPM.
|
||||
|
||||
12
scst.spec.in
12
scst.spec.in
@@ -3,22 +3,12 @@
|
||||
# The algorithm for setting the variable kversion is as follows:
|
||||
# - If the variable kversion has been set, use its value.
|
||||
# - If the variable kdir has been set, derive the kernel version from kdir.
|
||||
# - If an RPM with the name kernel-headers exists (RHEL / CentOS), use the
|
||||
# version number of the kernel that package is based on. This provides the
|
||||
# version number when building on a koji build server.
|
||||
# - Otherwise use the version number of the running kernel.
|
||||
%{!?kversion:
|
||||
%{?kdir:%define kversion %{expand:%%(
|
||||
make -sC "%{kdir}" kernelversion | grep -v ^make)}}
|
||||
%{!?kdir:
|
||||
%define kversion %{expand:%%(
|
||||
if rpm --quiet -q kernel-headers; then
|
||||
rpm -q --qf '%%%%{BUILDTIME} %%%%{version}-%%%%{release}.%%%%{arch}\\n' \\
|
||||
kernel-headers | sort | tail -n1 | { read a b; echo $b; };
|
||||
else
|
||||
uname -r;
|
||||
fi
|
||||
)}}}
|
||||
%define kversion %{expand:%%(uname -r)}}}
|
||||
%{echo:kversion=%{kversion}
|
||||
}
|
||||
# kernel_rpm: Name of the kernel RPM if the kernel is available as an RPM.
|
||||
|
||||
Reference in New Issue
Block a user