summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Lewandowski <k.lewandowsk@samsung.com>2014-01-14 11:10:15 +0100
committerPatrick McCarty <patrick.mccarty@linux.intel.com>2014-01-29 11:04:41 -0800
commitf5081b28715feae781b50a4421e5f50c67570f88 (patch)
tree405865ca0b6cc798f49c30ce62f066b790d8fad9
parentb70c8566e820f220eb934fbb4de4c9bd87a80aa0 (diff)
downloadlibrpm-tizen-f5081b28715feae781b50a4421e5f50c67570f88.tar.gz
librpm-tizen-f5081b28715feae781b50a4421e5f50c67570f88.tar.bz2
librpm-tizen-f5081b28715feae781b50a4421e5f50c67570f88.zip
tizen: Export kernel-devel's package version as %kernel_devel_uname_r
This macro provides full version string of available kernel headers as provided by kernel-devel package. This functionality should simplify process of packaging additional external kernel modules eliminating the step of manual searching for appropriate kernel build directory, eg. BuildRequires: kernel-devel %build make M=/lib/modules/%{kernel_devel_uname_r}/build modules Change-Id: Iea73e418065068f8451c42a2a3a4b46a9b5ffaac Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
-rw-r--r--packaging/rpm-tizen_macros3
1 files changed, 3 insertions, 0 deletions
diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros
index ad0bc92ec..522cd644a 100644
--- a/packaging/rpm-tizen_macros
+++ b/packaging/rpm-tizen_macros
@@ -13,6 +13,9 @@
%rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/")
%rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")')
+# external kernel module helper macro(s)
+%kernel_devel_uname_r %(/bin/rpm -q --provides $(/bin/rpm -q --whatprovides kernel-devel-uname-r) | sed -ne 's,kernel-devel-uname-r = ,, p')
+
# this script calls all scripts in /usr/lib/rpm/brp-tizen.d
%__os_install_post \
/usr/lib/rpm/brp-compress \