use alienfile;

plugin 'Probe::CommandLine' => (
  command => 'gzip',
  args    => [ '--version' ],
  match   => qr/gzip/,
  version => qr/gzip ([0-9\.]+)/,
);

share {

  meta->prop->{out_of_source} = 1;

  plugin Download => (
    url     => 'http://ftp.gnu.org/gnu/gzip/',
    filter  => qr/^gzip-.*\.tar\.xz$/,
    version => qr/([0-9\.]+)/,
  );

  # So.  Gnu Not Understandable apparently
  # does not distribute gzip as a tarball
  # anymore.  So yeah.  You need xz.  
  plugin Extract => 'tar.xz';
  
  plugin 'Build::Autoconf' => ();
  
  test [ '%{make} check' ];

};
