diff options
author | Michael Schroeder <mls@suse.de> | 2012-03-30 17:17:19 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-03-30 17:18:38 +0200 |
commit | af05d931c1537bdfeec1b5d518077152f177d152 (patch) | |
tree | aa81e49ab4644666fc5efc186c2b50faaf94b442 /Build.pm | |
parent | bf3a5a32887b69ae843e3695a230e785be2d9b42 (diff) | |
download | obs-build-af05d931c1537bdfeec1b5d518077152f177d152.tar.gz obs-build-af05d931c1537bdfeec1b5d518077152f177d152.tar.bz2 obs-build-af05d931c1537bdfeec1b5d518077152f177d152.zip |
- start support for arch linux, code mostly written by Nikolay Rysev <mad.f3ka@gmail.com>
Diffstat (limited to 'Build.pm')
-rw-r--r-- | Build.pm | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -10,20 +10,25 @@ our $expand_dbg; our $do_rpm; our $do_deb; our $do_kiwi; +our $do_arch; sub import { for (@_) { $do_rpm = 1 if $_ eq ':rpm'; $do_deb = 1 if $_ eq ':deb'; $do_kiwi = 1 if $_ eq ':kiwi'; + $do_arch = 1 if $_ eq ':arch'; } - $do_rpm = $do_deb = $do_kiwi = 1 if !$do_rpm && !$do_deb && !$do_kiwi; + $do_rpm = $do_deb = $do_kiwi = $do_arch = 1 if !$do_rpm && !$do_deb && !$do_kiwi && !$do_arch; if ($do_deb) { require Build::Deb; } if ($do_kiwi) { require Build::Kiwi; } + if ($do_arch) { + require Build::Arch; + } } my $std_macros = q{ @@ -854,6 +859,7 @@ sub parse { 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 undef; } @@ -867,6 +873,7 @@ sub query { return Build::Rpm::query($handle, %opts) if $do_rpm && $binname =~ /\.rpm$/; return Build::Deb::query($handle, %opts) if $do_deb && $binname =~ /\.deb$/; return Build::Kiwi::queryiso($handle, %opts) if $do_kiwi && $binname =~ /\.iso$/; + return Build::Arch::query($handle, %opts) if $do_arch && $binname =~ /\.pkg\.tar(?:\.gz|\.xz)?$/; return undef; } @@ -877,6 +884,7 @@ sub queryhdrmd5 { return Build::Kiwi::queryhdrmd5(@_) if $do_kiwi && $binname =~ /\.iso$/; return Build::Kiwi::queryhdrmd5(@_) if $do_kiwi && $binname =~ /\.raw$/; return Build::Kiwi::queryhdrmd5(@_) if $do_kiwi && $binname =~ /\.raw.install$/; + return Build::Arch::queryhdrmd5(@_) if $do_arch && $binname =~ /\.pkg\.tar(?:\.gz|\.xz)?$/; return undef; } |