#!/usr/bin/perl

open (IN, "< lib/Mail/SpamAssassin.pm")
	or die "cannot open lib/Mail/SpamAssassin.pm\n";
while (<IN>) {
  ($VERSION) = /^\s*\$VERSION\s*=\s*\"(\S+)\"\;/ unless ( $VERSION );
  ($EXTRA) = /^\s*\@EXTRA_VERSION\s*=\s*q\w\((\S+?)\)/ unless ( $EXTRA );
  ($DEVEL) = /^\s*\$IS_DEVEL_BUILD\s*=\s*(1);/ unless ( $DEVEL );
}
close IN;

print $VERSION;
print "-$EXTRA" if ( $EXTRA );
print "-cvs" if ( $DEVEL );
print "\n";
