use alienfile;

#our $VERSION = 0.004_000;

plugin 'Probe::CommandLine' => (
    command => 'makeinfo',
    args    => ['--version'],
    # EXAMPLE: texi2any (GNU texinfo) 6.1
    # EXAMPLE: makeinfo (GNU texinfo) 5.2
    match   => qr/\(GNU\ texinfo\)/,
    version => qr/^\w+\ \(GNU\ texinfo\)\ ([0-9\.]+)$/,
);
 
share {
    plugin Download => (
        url => 'https://wbraswell.github.io/texinfo-mirror/',  # GitHub mirror server
        filter => qr/^texinfo-.*\.tar\.gz$/,
        version => qr/^texinfo-([0-9\.]+)/,
    );
    plugin Extract => 'tar.gz';
    plugin 'Build::Autoconf' => ();
    build [
        '%{configure} --disable-perl-xs',  # fix segfault on Perl v5.8
        '%{gmake}',
        '%{gmake} install',
    ];
};
