aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2009-08-08 10:34:27 +0000
committerAnssi Hannula <anssi@mandriva.org>2009-08-08 10:34:27 +0000
commit87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c (patch)
treeea6b500931795881ec242bca15a6f651ba561a1f /build.macros.in
parentef8e57e11fbb52f8e3f31c65b9a371d094855e5c (diff)
downloadrpm-setup-87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c.tar
rpm-setup-87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c.tar.gz
rpm-setup-87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c.tar.bz2
rpm-setup-87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c.tar.xz
rpm-setup-87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c.zip
Update perl_convert_version to keep alphabetic tail in version number
(Luca Berra).
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/build.macros.in b/build.macros.in
index b7a2aeb..009a6c8 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -223,7 +223,16 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} -
#
-%perl_convert_version() %(perl -Mversion -le '$v=version->new("%{1}")->normal; $v=~s/^v//; print $v')
+%perl_convert_version() %(perl -Mversion -le '
+ $x = "%{1}";
+ $y = $x;
+ $x =~ s/[[:alpha:]]*$//;
+ $y =~ s/^$x//;
+ $x =~ s/\D*$//;
+ $v = version->new($x)->normal;
+ $v =~ s/^v//;
+ print "$v$y";
+')
# kept for compatibility, but should not be used, especially the ugly perl_archlib!
%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)