Zakariyya Mughal > Dist-Zilla-Plugin-Alien > Dist::Zilla::Plugin::Alien

Download:
Dist-Zilla-Plugin-Alien-0.014.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.014   Source  

NAME ^

Dist::Zilla::Plugin::Alien - Use Alien::Base with Dist::Zilla

VERSION ^

version 0.014

SYNOPSIS ^

In your dist.ini:

  name = Alien-myapp

  [Alien]
  repo = http://myapp.org/releases
  bins = myapp myapp_helper
  # the following parameters are based on the dist name automatically
  name = myapp
  pattern_prefix = myapp-
  pattern_version = ([\d\.]+)
  pattern_suffix = \.tar\.gz
  pattern = myapp-([\d\.]+)\.tar\.gz

  # commands used to build (optional)
  build_command = %pconfigure --prefix=%s
  # ...

  # commands uses to install (optional)
  install_command = make install

DESCRIPTION ^

This is a simple wrapper around Alien::Base, to make it very simple to generate a distribution that uses it. You only need to make a module like in this case Alien::myapp which extends Alien::Base and additionally a url that points to the path where the downloadable .tar.gz of the application or library can be found. For more informations about the parameter, please checkout also the Alien::Base documentation. The repo paramter is automatically taken apart to supply the procotol, host and other parameters for Alien::Base.

Warning: Please be aware that Alien::Base uses Module::Build, which means you shouldn't have Dist::Zilla::Plugin::MakeMaker loaded. For our case, this means, you can't just easily use it together with the common Dist::Zilla::PluginBundle::Basic, because this includes it. As alternative you can use Dist::Zilla::PluginBundle::Alien which is also included in this distribution.

ATTRIBUTES ^

repo

The only required parameter, defines the path for the packages of the product you want to alienfy. This must not include the filename.

To indicate a local repository use the file: scheme:

   # located in the base directory
   repo = file:.

   # located in the inc/ directory relative to the base
   repo = file:inc

pattern

The pattern is used to define the filename to be expected from the repo of the alienfied product. It is set together out of pattern_prefix, pattern_version and pattern_suffix. pattern_prefix is by default "name" together with a dash.

bins

A space or tab seperated list of all binaries that should be wrapped to be executable from the perl environment (if you use perlbrew or local::lib this also guarantees that its available via the PATH).

name

The name of the Alien package, this is used for the pattern matching filename. If none is given, then the name of the distribution is used, but the Alien- is cut off.

build_command

The ordered sequence of commands used to build the distribution (passed to the alien_build_commands option). This is optional.

  # configure then make
  build_command = %pconfigure --prefix=%s
  build_command = make

install_command

The ordered sequence of commands used to install the distribution (passed to the alien_install_commands option). This is optional.

  install_command = make install

isolate_dynamic

If set to true, then dynamic libraries will be isolated from the static libraries when install_type=share is used. This is recommended for XS modules where static libraries are more reliable. Dynamic libraries (.dll, .so, etc) are still available and can easily be used by FFI modules.

  isolate_dynamic = 1

Usage of this attribute will bump the requirement of Alien::Base up to 0.005 for your distribution.

autoconf_with_pic

If set to true (the default), then --with-pic will be passed to autoconf style configure scripts. This usually enables position independent code which is desirable if you are using static libraries to build XS modules. Usually, if the autoconf does not recognize --with-pic it will ignore it, but some configure scripts which are not managed by autoconf may complain and die with this option.

  ; only if you know configure will die with --with-pic
  autoconf_with_pic = 0

Usage of this attribute will bump the requirement of Alien::Base up to 0.005 for your distribution.

inline_auto_include

List of header files to automatically include (see Inline::C#auto_include) when the Alien module is used with Inline::C or Inline::CPP.

msys

Force the use of Alien::MSYS when building on Windows. Normally this is only done if Alien::Base::ModuleBuild can detect that you are attempting to use an autotools style configure script.

bin_requires

Require the use of a binary tool Alien distribution. You can optionally specify a version using the equal = sign.

 [Alien]
 bin_requires = Alien::patch
 bin_requires = Alien::gmake = 0.03

InstallRelease ^

The method Alien::Base is using would compile the complete Alien 2 times, if you use it in combination with Dist::Zilla::Plugin::InstallRelease. One time at the test, and then again after release. With a small trick, you can avoid this. You can use Dist::Zilla::Plugin::Run to add an additional test which installs out of the unpacked distribution for the testing:

  [Run::Test]
  run_if_release = ./Build install

This will do the trick :). Be aware, that you need to add this plugin after [ModuleBuild]. You can use Dist::Zilla::PluginBundle::Author::GETTY, which directly use this trick in the right combination.

AUTHOR ^

Torsten Raudssus <torsten@raudss.us>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: