}
}
+package Build::Features;
+our $preinstallimage = 1; # on sale now
+package Build;
+
my $std_macros = q{
%define nil
%define ix86 i386 i486 i586 i686 athlon
$rr &= 5 unless $pf & 2;
# verscmp for spec and kiwi types
my $vv;
- if ($config->{'binatytype'} eq 'deb') {
+ if ($config->{'binarytype'} eq 'deb') {
$vv = Build::Deb::verscmp($pv, $rv, 1);
} else {
$vv = Build::Rpm::verscmp($pv, $rv, 1);
print "$_\n" for @$x;
}
+sub parse_preinstallimage {
+ return undef unless $do_rpm;
+ my $d = Build::Rpm::parse(@_);
+ $d->{'name'} ||= 'preinstallimage';
+ return $d;
+}
+
sub parse {
my ($cf, $fn, @args) = @_;
return Build::Rpm::parse($cf, $fn, @args) if $do_rpm && $fn =~ /\.spec$/;
return Build::Deb::parse($cf, $fn, @args) if $do_deb && $fn =~ /\.dsc$/;
return Build::Kiwi::parse($cf, $fn, @args) if $do_kiwi && $fn =~ /config\.xml$/;
return Build::Kiwi::parse($cf, $fn, @args) if $do_kiwi && $fn =~ /\.kiwi$/;
- return Build::Arch::parse($cf, $fn, @args) if $do_arch && $fn =~ /PKGBUILD$/;
+ return Build::Arch::parse($cf, $fn, @args) if $do_arch && $fn =~ /(^|\/|-)PKGBUILD$/;
+ return parse_preinstallimage($cf, $fn, @args) if $fn =~ /(^|\/|-)preinstallimage$/;
return undef;
}
$$nfbline = [$$nfbline, undef ];
}
}
- unshift @subpacks, $ret->{'name'};
+ unshift @subpacks, $ret->{'name'} if defined $ret->{'name'};
$ret->{'subpacks'} = \@subpacks;
$ret->{'exclarch'} = $exclarch if defined $exclarch;
$ret->{'badarch'} = $badarch if defined $badarch;