Skip to content

Commit

Permalink
Implement
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Dec 12, 2023
1 parent 49ee900 commit bf88d18
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 13 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
23 changes: 13 additions & 10 deletions alienfile
Original file line number Diff line number Diff line change
@@ -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';
}
6 changes: 3 additions & 3 deletions t/alien_tarql.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit bf88d18

Please sign in to comment.