|
|
|
@ -24,6 +24,15 @@ sub create_patches {
@@ -24,6 +24,15 @@ sub create_patches {
|
|
|
|
|
close GIT; # be done |
|
|
|
|
return @lines; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
sub filter_patch { |
|
|
|
|
my $patch=shift; |
|
|
|
|
open(P, $patch); |
|
|
|
|
@lines=<P>; |
|
|
|
|
close(P); |
|
|
|
|
grep (/^ 0 files changed/, @lines); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
use POSIX qw(strftime); |
|
|
|
|
my $datestr = strftime "%Y%m%d", gmtime; |
|
|
|
|
|
|
|
|
@ -40,12 +49,13 @@ while(<>) {
@@ -40,12 +49,13 @@ while(<>) {
|
|
|
|
|
print "Version: $tag\n"; |
|
|
|
|
} |
|
|
|
|
elsif (/^Release:/) { |
|
|
|
|
print "Release: $release\n"; |
|
|
|
|
print "Release: $release%{?dist}\n"; |
|
|
|
|
} |
|
|
|
|
elsif ((/^Source0:/) || (/^Source:/)) { |
|
|
|
|
print $_; |
|
|
|
|
$num=1; |
|
|
|
|
for(@patches) { |
|
|
|
|
next if filter_patch $_; |
|
|
|
|
print "Patch$num: $_"; |
|
|
|
|
$num++; |
|
|
|
|
} |
|
|
|
@ -55,6 +65,7 @@ while(<>) {
@@ -55,6 +65,7 @@ while(<>) {
|
|
|
|
|
print $_; |
|
|
|
|
$num=1; |
|
|
|
|
for(@patches) { |
|
|
|
|
next if filter_patch $_; |
|
|
|
|
print "%patch$num -p1\n"; |
|
|
|
|
$num++; |
|
|
|
|
} |
|
|
|
|