aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-02-03 09:15:57 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-02-03 09:15:57 +0000
commit1031292e08514fcb6e0b5271002707eb750f0eff (patch)
tree9bd8f17a32f5e8fc5ecf2cb36929b68cfe8b2a42
parent0b404041c3d71821e8c6b34c530304ab6f31fce8 (diff)
downloadrpm-setup-1031292e08514fcb6e0b5271002707eb750f0eff.tar
rpm-setup-1031292e08514fcb6e0b5271002707eb750f0eff.tar.gz
rpm-setup-1031292e08514fcb6e0b5271002707eb750f0eff.tar.bz2
rpm-setup-1031292e08514fcb6e0b5271002707eb750f0eff.tar.xz
rpm-setup-1031292e08514fcb6e0b5271002707eb750f0eff.zip
Add new perl_convert_version macro to convert cpan version to rpm version
-rw-r--r--build.macros.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/build.macros.in b/build.macros.in
index 500020f..da63c12 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -222,6 +222,9 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} -
# %{_mandir}/*/*
#
+
+%perl_convert_version() %(perl -Mversion -E '$v=version->new(%{1})->normal; $v=~s/^v//; say $v')
+
# kept for compatibility, but should not be used, especially the ugly perl_archlib!
%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
%perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)