|
NAMEAlien::Base::ModuleBuild - A Module::Build subclass for building Alien:: modules and their librariesVERSIONversion 1.15SYNOPSISIn your Build.PL:use Alien::Base::ModuleBuild; my $builder = Alien::Base::ModuleBuild->new( module_name => 'Alien::MyLibrary', configure_requires => { 'Alien::Base::ModuleBuild' => '0.005', 'Module::Build' => '0.28' }, requires => { 'Alien::Base' => '0.005', }, alien_name => 'mylibrary', # the pkg-config name if you want # to use pkg-config to discover # system version of the mylibrary alien_repository => { protocol => 'http', host => 'myhost.org', location => '/path/to/tarballs', pattern => qr{^mylibrary-([0-9\.]+)\.tar\.gz$}, }, # this is the default: alien_build_commands => [ "%c --prefix=%s", # %c is a platform independent version of ./configure "make", ], # this is the default for install: alien_install_commands => [ "make install", ], alien_isolate_dynamic => 1, ); DESCRIPTIONNOTE: Please consider for new development of Aliens that you use Alien::Build and alienfile instead. Like this module they work with Alien::Base. Unlike this module they are more easily customized and handle a number of corner cases better. For a good place to start, please see Alien::Build::Manual::AlienAuthor. Although the Alien-Base / Alien-Build team will continue to maintain this module, (we will continue to fix bugs where appropriate), we aren't adding any new features to this module.This is a subclass of Module::Build, that with Alien::Base allows for easy creation of Alien distributions. This module is used during the build step of your distribution. When properly configured it will
METHODSalien_check_installed_version[version 0.001]my $version = $abmb->alien_check_installed_version; This function determines if the library is already installed as part of the operating system, and returns the version as a string. If it can't be detected then it should return empty list. The default implementation relies on "pkg-config", but you will probably want to override this with your own implementation if the package you are building does not use "pkg-config". alien_check_built_version[version 0.006]my $version = $amb->alien_check_built_version; This function determines the version of the library after it has been built from source. This function only gets called if the operating system version can not be found and the package is successfully built. The version is returned on success. If the version can't be detected then it should return empty list. Note that failing to detect a version is considered a failure and the corresponding "./Build" action will fail! Any string is valid as a version as far as Alien::Base is concerned. The most useful value would be a number or dotted decimal that most software developers recognize and that software tools can differentiate. In some cases packages will not have a clear version number, in which case the string "unknown" would be a reasonable choice. The default implementation relies on "pkg-config", and other heuristics, but you will probably want to override this with your own implementation if the package you are building does not use "pkg-config". When this method is called, the current working directory will be the build root. If you see an error message like this: Library looks like it installed, but no version was determined After the package is built from source code then you probably need to provide an implementation for this method. alien_extract_archive[version 0.024]my $dir = $amb->alien_extract_archive($filename); This function unpacks the given archive and returns the directory containing the unpacked files. The default implementation relies on Archive::Extract that is able to handle most common formats. In order to handle other formats or archives requiring some special treatment you may want to override this method. alien_do_system[version 0.024]my %result = $amb->alien_do_system($cmd) Similar to Module::Build::do_system, also sets the path and several environment variables in accordance to the object configuration (i.e. "alien_bin_requires") and performs the interpolation of the patterns described in "COMMAND INTERPOLATION" in Alien::Base::ModuleBuild::API. Returns a set of key value pairs including "stdout", "stderr", "success" and "command". alien_do_commands$amb->alien_do_commands($phase); Executes the commands for the given phase. alien_interpolatemy $string = $amb->alien_interpolate($string); Takes the input string and interpolates the results. GUIDE TO DOCUMENTATIONThe documentation for "Module::Build" is broken up into sections:
ENVIRONMENT
SEE ALSO
THANKSThanks also to
AUTHOROriginal author: Joel A Berger <joel.a.berger@gmail.com>Current maintainer: Graham Ollis <plicease@cpan.org> Contributors: David Mertens (run4flat) Mark Nunberg (mordy, mnunberg) Christian Walde (Mithaldu) Brian Wightman (MidLifeXis) Graham Ollis (plicease) Zaki Mughal (zmughal) mohawk2 Vikas N Kumar (vikasnkumar) Flavio Poletti (polettix) Salvador Fandin~o (salva) Gianni Ceccarelli (dakkar) Pavel Shaydo (zwon, trinitum) Kang-min Liu (XXX, gugod) Nicholas Shipp (nshp) Petr Pisar (ppisar) Alberto Simo~es (ambs) COPYRIGHT AND LICENSEThis software is copyright (c) 2012-2020 by Joel A Berger.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |