Shipwright

 view release on metacpan or  search on metacpan

lib/Shipwright.pm  view on Meta::CPAN

    one liner doing the same thing:
    $ shipwright-generate cpan:Jifty | perl - --install-base /tmp/jifty


=head1 DESCRIPTION

=head2 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.

=head2 Introduction

If this is your first time using Shipwright, L<Shipwright::Manual::Tutorial> is
probably a better place to start.

=head2 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 |
----------------------------------------------

=head2 What's in a shipyard

=head3 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

=head3 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'.

=head4 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 L<Shipwright::Manual::CustomizeBuild> for more information on
customizing the build process for dists.

=head4 require.yml

build_requires: {}

conflicts: {}

recommends:
  cpan-Locale-Maketext-Lexicon: 
    version: 0.15



( run in 0.607 second using v1.01-cache-2.11-cpan-39bf76dae61 )