#!/usr/bin/perl use strict; use warnings; use JSON; my $desc = shift; my $file = shift; my $mach = shift; die "arguments missing" unless defined($desc) and defined($file) and defined($mach); my $json = JSON->new->allow_nonref; my $info; my $x86; my $x64; $x86->{'architecture'} = 'i386'; $x86->{'machines'} = [ "pc-${mach}-*" ]; $x64->{'architecture'} = 'x86_64'; $x64->{'machines'} = [ "pc-${mach}-*" ]; $info->{'description'} = $desc; $info->{'interface-types'} = [ 'bios' ]; $info->{'mapping'}->{'device'} = 'memory'; $info->{'mapping'}->{'filename'} = $file; $info->{'targets'} = [ $x86, $x64 ]; $info->{'features'} = [ 'acpi-s3', 'acpi-s4' ]; $info->{'tags'} = [ 'git master autobuild' ]; print $json->pretty->encode($info);