forked from pool/kernel-source
This commit is contained in:
committed by
Git OBS Bridge
parent
0b79a6ce1b
commit
d4ad2e2ea3
21
mkspec
21
mkspec
@@ -4,9 +4,16 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Copy;
|
||||
use Data::Dumper;
|
||||
use Getopt::Long;
|
||||
|
||||
my $dir = ".";
|
||||
my $rpmrelease;
|
||||
my $patches="";
|
||||
|
||||
GetOptions(
|
||||
"patches=s" => \$patches,
|
||||
"release=s" => \$rpmrelease
|
||||
) or die "Usage: $0 [--release <release>] [--patches <dir>]\n";
|
||||
|
||||
# flavor -> [supported archs]
|
||||
my %flavor_archs = parse_config_conf();
|
||||
@@ -24,15 +31,17 @@ my $changelog = convert_changes();
|
||||
# package name -> [summary, description]
|
||||
my %binary_descriptions = parse_descriptions();
|
||||
|
||||
my $patchversion = `$dir/compute-PATCHVERSION.sh`;
|
||||
$patches="--patches $patches" if $patches;
|
||||
my $patchversion = `$dir/compute-PATCHVERSION.sh $patches`;
|
||||
chomp $patchversion;
|
||||
my ($rpmversion, $rpmrelease) = split(/-/, $patchversion, 2);
|
||||
my $rpmversion;
|
||||
if (defined($rpmrelease)) {
|
||||
$rpmrelease =~ s/-/./g;
|
||||
$rpmrelease .= ".";
|
||||
($rpmversion = $patchversion) =~ s/-.*//;
|
||||
} else {
|
||||
$rpmrelease = "";
|
||||
($rpmversion, $rpmrelease) = (split(/-/, $patchversion, 2), "");
|
||||
}
|
||||
$rpmrelease =~ s/[^.]$/$&./;
|
||||
$rpmrelease =~ s/-/./g;
|
||||
|
||||
my %macros = (
|
||||
VARIANT => $variant,
|
||||
|
Reference in New Issue
Block a user