7 open( GIT
, 'git format-patch -M -N --no-signature -o "'.$pdir.'" '.$tag.' |');
13 use POSIX
qw(strftime);
14 my $datestr = strftime
"%Y%m%d", gmtime;
18 $tag=`git describe --abbrev=0 --tags` if not defined $tag;
20 my @patches=&create_patches
($tag, $pdir);
21 my $num=$#patches + 2;
22 $tag=~s/[^0-9]+?([0-9]+)/$1/;
23 my $release="$num.git$datestr";
24 $release="1" if $num == 1;
28 print "Version: $tag\n";
31 print "Release: $release%{?dist}\n";
33 elsif ((/^Source0:/) || (/^Source:/)) {
38 print "Patch$num: $_";