linux: makesrpm should cope with releases with letters

don't just deal with numbered releases.

Change-Id: Iab97e4a7bebebf97d367243501aaf2a0b4b0476c
Reviewed-on: http://gerrit.openafs.org/5602
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Simon Wilkinson 2011-10-12 09:44:37 -04:00 committed by Derrick Brashear
parent 488c7c9785
commit 69f54d4748

View File

@ -82,10 +82,14 @@ if ($afsversion=~m/(.*)(pre[0-9]+)/) {
$linuxrel=1; $linuxrel=1;
} }
if ($afsversion=~m/-([0-9]+)-(g[a-f0-9]+)$/) { if ($afsversion=~m/(.*)-([0-9]+)-(g[a-f0-9]+)$/) {
$linuxrel.=".$1.$2"; $linuxver = $1 if ($linuxver eq $afsversion);
$linuxrel.=".$2.$3";
} }
print "Linux release is $linuxrel\n";
print "Linux version is $linuxver\n";
# Figure out a major, minor and release so that we know which version we're # Figure out a major, minor and release so that we know which version we're
# building, and therefore what the srpm is going to be called # building, and therefore what the srpm is going to be called
$linuxver=~/([0-9]+)\.([0-9]+)\.([0-9]+)/; $linuxver=~/([0-9]+)\.([0-9]+)\.([0-9]+)/;