1
0
forked from pool/kernel-source

GIT Revision: d20736defed598704cae363f805d7eb26f280384

OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-source?expand=0&rev=7178
This commit is contained in:
Michal Marek
2011-12-14 06:01:53 +00:00
committed by Git OBS Bridge
parent 74d61aea73
commit e4b0b07d4d
35 changed files with 388 additions and 54 deletions

13
mkspec
View File

@@ -65,12 +65,15 @@ my $unpack_patches = join(" ", map { "-a $_" } @tarballs);
my $scripts = join(",", grep { is_script($_) }
($sources =~ /\nSource\d+:\s*([^\s]*)/mg));
(my $major_version = $srcversion) =~ s/\..*//;
my $ftp_directory = "pub/linux/kernel/v$major_version.x";
my %macros = (
VARIANT => $variant,
VANILLA_ONLY => $vanilla_only,
SRCVERSION => $srcversion,
PATCHVERSION => $patchversion,
RPMVERSION => $rpmversion,
FTP_DIRECTORY => $ftp_directory,
RELEASE => $rpmrelease,
SOURCES => $sources,
NOSOURCE => $nosource,
@@ -277,9 +280,13 @@ sub do_spec {
my %macros = @_;
my $text = $templates{$template};
for my $m (keys %macros) {
$text =~ s/\@$m\@/$macros{$m}/g;
}
my $prev_text;
do {
$prev_text = $text;
for my $m (keys %macros) {
$text =~ s/\@$m\@/$macros{$m}/g;
}
} while ($prev_text ne $text);
print "$specfile\n";
xopen(my $fh, '>', "$dir/$specfile");
print $fh $text;