new
NAME
Shipwright - Best Practical Builder
SYNOPSIS
$ export SHIPWRIGHT_SHIPYARD=fs:/tmp/fs
$ shipwright create
# import will take a while, enjoy your coffee!
$ shipwright import cpan:Jifty
$ cd /tmp/fs
$ ./bin/shipwright-builder --install-base /tmp/jifty
one liner doing the same thing:
$ shipwright-generate cpan:Jifty | perl - --install-base /tmp/jifty
DESCRIPTION
Why use Shipwright?
Most software packages depend on other bits of software in order to avoid code repetition. This may result in pain when attempting to install the software, due to the maze of dependencies, especially for large projects with many dependencies.
Shipwright is a tool to help you bundle your software with all its dependencies, regardless of whether they are CPAN modules or non-Perl modules from elsewhere. Shipwright makes the bundle work easy.
Introduction
If this is your first time using Shipwright, Shipwright::Manual::Tutorial is probably a better place to start.
Design
The idea of Shipwright is simple:
sources shipwright factory
--------------------- ------------------------
| all the separate | import | shipyard | build
| sources | =====> | | ====>
--------------------- ------------------------
vessel (final product)
----------------------------------------------
| all packages installed with smart wrappers |
----------------------------------------------
What's in a shipyard
shipyard after initialization
After initializing a shipyard, the files in the repository are:
bin/ # used for building, installing and testing shipwright-builder # a utility for doing things such as updating the build order shipwright-utility
etc/ # wrapper for installed bin files, mainly for optimizing the environment shipwright-script-wrapper # wrapper for installed perl scripts shipwright-perl-wrapper # source files you can `source', for tcsh and bash, respectively. # both will be installed to tools/ shipwright-source-tcsh, shipwright-source-bash # utility which will be installed to tools/ shipwright-utility # set env bat for windows shipwright-windows-setenv.bat
inc/ # modules for shipwright itself
sources/ # all the sources live here
scripts/ # all the build scripts and dependency hints live here
shipwright/
# branches note, see L<Shipwright::Manual::UsingBranches>
branches.yml
# flags note, see L<Shipwright::Manual::UsingFlags>
flags.yml
# test failures note
known_test_failures.yml
# cpan dists' module => name map
map.yml
# the actual build order
order.yml
# reference count note
refs.yml
# non-cpan dists' name => url map
source.yml
# sources' version
version.yml
t/ # will run this if with --only-test when build test
shipyard after import
After importing, say cpan:Acme::Hello, both the sources and scripts directories will have a `cpan-Acme-Hello' directory.
Under scripts/cpan-Acme-Hello there are two files: 'build' and 'require.yml'.
build
configure: %%PERL%% %%MODULE_BUILD_BEFORE_BUILD_PL%% Build.PL --install_base=%%INSTALL_BASE%% --install_path lib=%%INSTALL_BASE%%/lib/perl5 --install_path arch=%%INSTALL_BASE%%/lib/perl5 make: %%PERL%% %%MODULE_BUILD_BEFORE_BUILD%% Build test: %%PERL%% %%MODULE_BUILD_BEFORE_BUILD%% Build test install: %%PERL%% %%MODULE_BUILD_BEFORE_BUILD%% Build install clean: %%PERL%% %%MODULE_BUILD_BEFORE_BUILD%% Build realclean
Each line is of `type: command' format, and the command is executed line by line (which is also true for t/test).
See Shipwright::Manual::CustomizeBuild for more information on customizing the build process for dists.
require.yml
build_requires: {}
conflicts: {}
recommends: cpan-Locale-Maketext-Lexicon: version: 0.15 requires: {}
This file details the hints needed in order for Shipwright to create the right build order.
vessel
After the cmd `./bin/shipwright-builder --install-base /tmp/vessel`, we have a new directory structure which we call a vessel(/tmp/vessel).
SEE ALSO
AUTHORS
sunnavy <sunnavy@bestpractical.com>
LICENCE AND COPYRIGHT
Shipwright is Copyright 2007-2015 Best Practical Solutions, LLC.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.