X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fpackaging%2FRedHat%2Fmakesrpm.pl;h=7a238f36398354e6027480bdab1625d5a65a9216;hp=54193d0b71f9c27d3e07d66ab898a2b871da645a;hb=ed3f1134460546888e2306262d88d6886beae7e1;hpb=87f2a92afb58660846d39c71ce630c3acfb72020 diff --git a/src/packaging/RedHat/makesrpm.pl b/src/packaging/RedHat/makesrpm.pl index 54193d0..7a238f3 100755 --- a/src/packaging/RedHat/makesrpm.pl +++ b/src/packaging/RedHat/makesrpm.pl @@ -43,24 +43,14 @@ die "Unable to find unpacked source code\n" if !$vdir; my $srcdir = $tmpdir."/".$vdir; -# Work out which version we're dealing with from the configure.ac file +# Work out which version we're dealing with from git-version script +# (which may use a .version file) my $afsversion; my $linuxver; my $linuxrel; -my $fh = new IO::File $srcdir."/configure.ac" - or die "Unable to find unpacked configure.ac file"; -while(<$fh>) { - next if (/^\s*\#/); - - if (/AM_INIT_AUTOMAKE\(openafs,(.*)\)/) { - $afsversion = $1; - next; - } -} -undef $fh; if (not defined($afsversion)) { - $afsversion = `"$srcdir/build-tools/git-version" "$srcdir"`; + $afsversion = `"/bin/sh" "$srcdir/build-tools/git-version" "$srcdir"`; } # Build the Linux version and release information from the package version