diff --git a/README.md b/README.md new file mode 100644 index 0000000..33bf066 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# NAME + +Alien::Tarql - Find or build Tarql (SPARQL for Tables) + +# SYNOPSIS + +Command line tool: + + use Alien::Tarql; + use Env qw( @PATH ); + + unshift @PATH, Alien::Tarql->bin_dir; + +# DESCRIPTION + +This distribution provides Tarql so that it can be used by other +Perl distributions that are on CPAN. It does this by first trying to +detect an existing install of Tarql on your system. If found it +will use that. If it cannot be found, the source code will be downloaded +from the internet and it will be installed in a private share location +for the use of other modules. + +# SEE ALSO + +- [https://tarql.github.io/](https://tarql.github.io/) + + Tarql homepage + +- [Alien](https://metacpan.org/pod/Alien) + + Documentation on the Alien concept itself. + +- [Alien::Base](https://metacpan.org/pod/Alien%3A%3ABase) + + The base class for this Alien. + +- [Alien::Build::Manual::AlienUser](https://metacpan.org/pod/Alien%3A%3ABuild%3A%3AManual%3A%3AAlienUser) + + Detailed manual for users of Alien classes. diff --git a/alienfile b/alienfile index 0534268..d2c2406 100644 --- a/alienfile +++ b/alienfile @@ -1,17 +1,20 @@ use alienfile; -# replace this with your own system probe. -# See Alien::Build::Plugin::Probe and -# Alien::Build::Plugin::PkgConfig for common -# probe plugins. -probe sub { 'share' }; +plugin 'Probe::CommandLine' => ( + command => 'tarql', + args => [ '--version' ], + match => qr/tarql/, + version => qr/tarql:\s+VERSION:\s+([0-9\.]+)/, +); share { - start_url 'https://github.com/tarql/tarql/releases/download/v1.2'; - plugin Download => ( - filter => qr/^tarql.*tar\.gz$/, - version => qr/([0-9\.]+)/, + plugin 'Download::GitHub' => ( + github_user => 'tarql', + github_repo => 'tarql', + asset => 1, + asset_name => qr/^tarql-.*\.tar\.gz$/, + asset_format => 'tar.gz', ); plugin Extract => 'tar.gz'; - plugin 'Gather::IsolateDynamic'; + plugin 'Build::Copy'; } diff --git a/t/alien_tarql.t b/t/alien_tarql.t index 68f05ae..db5ea7d 100644 --- a/t/alien_tarql.t +++ b/t/alien_tarql.t @@ -6,8 +6,8 @@ use Alien::Tarql; alien_diag 'Alien::Tarql'; alien_ok 'Alien::Tarql'; -# run_ok([ ... ]) -# ->success -# ->out_like(qr/ ... /); +run_ok([ 'tarql', '--version' ]) + ->success + ->out_like(qr/tarql:\s+VERSION:\s+([0-9\.]+)/); done_testing;