Shipwright
view release on metacpan or search on metacpan
share/bin/shipwright-builder view on Meta::CPAN
#!/usr/bin/env perl
use warnings;
use strict;
use lib 'inc';
use File::Spec::Functions qw/catfile catdir splitdir rel2abs path/;
use File::Temp qw/tempdir/;
use File::Copy::Recursive qw/rmove rcopy/;
use File::Find qw/find/;
use File::Path;
use Config;
use Getopt::Long;
use Cwd qw/getcwd/;
use YAML::Tiny;
use Shipwright::Util::CleanINC;
use Carp qw/confess/;
my $build_base = getcwd;
my $inc_lib = join '/', splitdir($build_base), 'inc';
@ARGV = get_default_builder_options() unless @ARGV;
my %args;
use Getopt::Long;
confess "unknown option"
unless GetOptions(
\%args, 'install-base=s',
'perl=s', 'skip=s',
'flags=s', 'skip-test',
'skip-test-except-final', 'only-test',
'skip-man-pages', 'force',
'clean', 'name=s',
'help', 'advanced-help',
'noclean', 'only=s',
'with=s', 'noclean-after-install',
'make=s', 'branches=s',
'verbose', 'as=s',
'no-install-base',
);
my $USAGE = <<'END';
run: ./bin/shipwright-builder
Commonly used options:
--install-base Where this vessel should be built. Defaults to
a directory inside your system's default 'temp'
directory. (Note that vessels are relocatable
once built)
Ex: --install-base /home/local/mydist
--no-install-base install to the default directory for each dist
--skip-test Don't run any tests at all
--skip-test-except-final Only run tests for the final package built
--skip-man-pages Don't install man pages for perl modules
--force Install this vessel, even if some tests fail
--advanced-help Show additional command-line options you're
less likely to use.
--verbose more output to stdout.
END
my $ADVANCED_USAGE = <<END;
Less commonly needed options:
--help Print this usage
--skip Dists we don't want to install, comma-separated
Ex: --skip perl,Module-Build
--perl Which perl to use for the to be installed vessel
If this vessel includes a perl build, shipwright will
use that by default. Otherwise, it will default to the
perl used to run this script.
Ex: --perl /usr/bin/perl
--only Skip all dists except those in this comma-separated list
Ex: --only perl,Module-Build
--name The name of the project. used to create a better named dir if
install_base is not supplied
Ex: --name mydist
--flags Set shipwright build flags we need, comma-separated
Ex: --flags mysql,standalone
--only-test Test for the installed dists
We use this to be sure everything is ok after successful
installation. This option requires that you specify
--install-base if no __install_base from a previous
Shipwright run is available.
--clean Remove vestiges of a previous build from a vessel
--noclean Don't automatically run a "clean" pass before building
--with Skip a distribution from the vessel, using one specified on
the commandline instead.
Ex: --with svn=dir:/home/foo/svn
'svn' is the dist name, 'dir:/home/foo/svn' is its source code,
in the format of a Shipwright source distribution.
--make The path of your make command, default is \$ENV{SHIPWRIGHT_MAKE}
Ex: --make /usr/bin/make
--branches Specify the branch of a given package in the vessel you want
to build.
Ex: --branches Foo=trunk,Bar=2.0
--as for multi-arch dists, you can use this to specify the arch name.
By default it's the uname.
END
if ( $args{'help'} ) {
print $USAGE;
exit 0;
}
( run in 0.876 second using v1.01-cache-2.11-cpan-5511b514fd6 )