Command line tool for alienfile
af probe --help
af download --help
af install --help
af requires --help
af missing --help
af prop --help
af list --help
The af
command is a command line interface to alienfile and
Alien::Build.
These options are available for all subcommands.
Print the help for either af
as a whole, or the specific subcommand.
Print the version of af
and exit.
af download
[ ( -f | --file ) alienfile | ( -c | --class ) class ]
[ ( -l | --local ) directory ]
Download the external resource using the usual alienfile logic. File
will be deposited in the directory indicated by the --local
(or -l
)
option, or the current working directory if not specified.
The alienfile. If neither this option, nor -c
is specified, then
alienfile
in the current directory will be assumed.
Get the alienfile from the already installed Alien module. You may
omit the Alien::
prefix, so for example Alien::curl may be specified
as simply curl
.
The location to store the downloaded resource. The current directory if not specified.
af probe
[ ( -f | --file ) alienfile | ( -c | --class ) class ]
[ --root directory ]
[ --before hook command ] [ --after hook command ]
[ -I lib ] [ --blib ]
Probe system for existing library or tool using the given alienfile.
The alienfile. If neither this option, nor -c
is specified, then
alienfile
in the current directory will be assumed.
Get the alienfile from the already installed Alien module. You may
omit the Alien::
prefix, so for example Alien::curl may be specified
as simply curl
. If you do not specify the --prefix
option, the
package will replace the already installed one.
Build in root
Add directory to the Perl search lib (like -I on perl).
Use the blib from the current directory.
af install
[ ( -f | --file ) alienfile | ( -c | --class ) class ]
[ --prefix directory | --dry-run ] [ --stage directory ]
[ --type ( share | system ) ] [ --root directory ]
[ --before hook command ] [ --after hook command ]
[ -I lib ] [ --blib ]
Install or reinstall using the given alienfile or already installed Alien.
The alienfile. If neither this option, nor -c
is specified, then
alienfile
in the current directory will be assumed.
Get the alienfile from the already installed Alien module. You may
omit the Alien::
prefix, so for example Alien::curl may be specified
as simply curl
. If you do not specify the --prefix
option, the
package will replace the already installed one.
The stage directory. By default this is a temporary directory that will automatically be removed.
The final install location to use. Required when using the -f
option,
but optional when using the -c
option.
Override the install type. May be either share
or system
.
Do not install into the final location.
Build in root
Execute the given command before the given hook. Note that the same hook my execute several times for a given recipe. Example, to open up an interactive shell before the build has started, right after the extraction:
% af install --before build bash
The build configuration is check pointed, so you can read the install
and runtime properties in the state.json
file in the build root.
Use * or % as the hook to run the command before all hooks. You can
use :repl
as the command to open up a Perl REPL (Read-Eval-Print-Loop)
to inspect the $build
and $meta
objects.
Execute the given command after the given hook. Note that the same hook my execute several times for a given recipe. Example, to open up an interactive shell after the build has completed:
% af install --after build bash
The build configuration is check pointed, so you can read the install
and runtime properties in the state.json
file in the build root.
Use * or % as the hook to run the command before all hooks. You can
use :repl
as the command to open up a Perl REPL (Read-Eval-Print-Loop)
to inspect the $build
and $meta
objects.
Add directory to the Perl search lib (like -I on perl).
Use the blib from the current directory.
af requires
[ ( -f | --file ) alienfile | ( -c | --class ) class ]
[ ( -p | --phase ) ( configure | any | share | system ) ]
Print the requirements for the given phase in YAML format. If the phase is not provided, then requirements for all phases will be printed separately in YAML format.
The alienfile. If neither this option, nor -c
is specified, then
alienfile
in the current directory will be assumed.
Get the alienfile from the already installed Alien module. You may
omit the Alien::
prefix, so for example Alien::curl may be specified
as simply curl
.
The phase of the requirement. Please refer to the Alien::Build documentation for the meaning of the various phases.
af missing
[ ( -f | --file ) alienfile | ( -c | --class ) class ]
[ ( -p | --phase ) ( configure | any | share | system ) ]
[ --plugin | --precompile ]
Print the requirements for the given phase in list format that are not currently fulfilled. This output can be piped into cpanm in order to install any missing requirements:
% af missing -p configure | cpanm
% af missing | cpanm
If no phase is specified, then missing prereqs for configure, and either share or system will be printed depending on what type of install is detected (for this to work you may need to install the configure prereqs, since the probe may use configure required modules).
The alienfile. If neither this option, nor -c
is specified, then
alienfile
in the current directory will be assumed.
Get the alienfile from the already installed Alien module. You may
omit the Alien::
prefix, so for example Alien::curl may be specified
as simply curl
.
The phase of the requirement. Please refer to the Alien::Build documentation for the meaning of the various phases.
Print out missing plugins. Caveat: to do this, af
mocks part of
Alien::Build::Meta, which may or may not break in the future.
Print out missing modules that are needed before the alienfile is even
compiled. These are usually configure
time prereqs, but if they are
use
d in the alienfile instead of being declared as a requires
, then
there is no way for Alien::Build to query for them. Caveat: since
alienfile is arbitrary Perl code, there may be corner cases not covered
by this option.
af prop
( -c | --class ) class [ --cflags ] [ --libs ] [ --static ]
[ --modversion ] [ --bin-dir ]
Print the runtime properties for the given Alien class. You may
omit the Alien::
prefix, so for example Alien::curl may be queried
as simply curl
. If no specific properties are requested then the
entire runtime property hash will be printed in YAML format.
The class to query for runtime properties. This option is required.
Print the compiler flags
Print the linker flags
For either the --cflags
or --libs
option print the static versions.
Print the version of the Alienized package. This is not the version of the Alien module itself.
Print the list of directories bundled with a share
install.
af list [ -l | --long ]
Print list of Alien modules already installed that used Alien::Build as their installer.
Also print the version number of the Alien module, and the version of the alienized package.
Author: Graham Ollis [email protected]
Contributors:
Diab Jerius (DJERIUS)
This software is copyright (c) 2017-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.