summaryrefslogtreecommitdiffstats
path: root/bin/macros/perl-dist
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-08-16 16:46:45 +0200
committerJustin Davis <jrcd83@gmail.com>2011-08-16 16:46:45 +0200
commit98590b40f2ec55144de6814ad9f90f3eae466b1b (patch)
tree3a77311b3c3bfde156ee7f9ee3e199cf7a85478e /bin/macros/perl-dist
parent5fceb54a28674b2dccbfc6b836d14afc242309d8 (diff)
downloadgenpkg-98590b40f2ec55144de6814ad9f90f3eae466b1b.tar.gz
genpkg-98590b40f2ec55144de6814ad9f90f3eae466b1b.tar.xz
Tweak version conversions again. Removes underscores.
Diffstat (limited to 'bin/macros/perl-dist')
-rwxr-xr-xbin/macros/perl-dist12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/macros/perl-dist b/bin/macros/perl-dist
index fbf74eb..484fc2d 100755
--- a/bin/macros/perl-dist
+++ b/bin/macros/perl-dist
@@ -45,13 +45,13 @@ sub dist_pkgver
{
my ($version) = @_;
- # Package versions should be numbers and decimal points only...
- $version =~ tr/-/./;
- $version =~ tr/_0-9.//cd;
-
# Remove developer versions because pacman has no special logic
- # to handle comparing them to regular versions like perl does.
- $version =~ s/_\d+\z//;
+ # to handle comparing them to regular versions such as perl uses.
+ $version =~ s/_[^_]+\z//;
+
+ # Package versions should be numbers and decimal points only...
+ $version =~ tr/-_/../;
+ $version =~ tr/0-9.//cd;
$version =~ tr/././s;
$version =~ s/^[.]|[.]$//g;