use ExtUtils::MakeMaker; use Alien::Build::MM; my $abmm = Alien::Build::MM->new; WriteMakefile($abmm->mm_args( ABSTRACT => 'Discover or download and install libfoo', DISTNAME => 'Alien-Libfoo', NAME => 'Alien::Libfoo', VERSION_FROM => 'lib/Alien/Libfoo.pm', ... )); sub MY::postamble { $abmm->mm_postamble; }
In your "lib/Alien/Libfoo.pm":
package Alien::Libfoo; use base qw( Alien::Base ); 1;
In your alienfile (needs to be named "alienfile" and should be in the root of your dist):
use alienfile; plugin 'PkgConfig' => 'libfoo'; share { start_url 'http://libfoo.org'; ... };
The alienfile must be named "alienfile".
If you are using Dist::Zilla to author your Alien dist, you should consider using the Dist::Zilla::Plugin::AlienBuild plugin.
I personally don't recommend it, but if you want to use Module::Build instead, you can use Alien::Build::MB.
my $abmm = Alien::Build::MM->new;
Create a new instance of Alien::Build::MM.
my $build = $abmm->build;
my $bool = $abmm->alienfile_meta
Set to a false value, in order to turn off the x_alienfile meta
my %args = $abmm->mm_args(%args);
Adjust the arguments passed into "WriteMakefile" as needed by Alien::Build.
my $postamble $abmm->mm_postamble;
Returns the postamble for the "Makefile" needed for Alien::Build. This adds the following "make" targets which are normally called when you run "make all", but can be run individually if needed for debugging.
Contributors:
Diab Jerius (DJERIUS)
Roy Storey
Ilya Pavlov
David Mertens (run4flat)
Mark Nunberg (mordy, mnunberg)
Christian Walde (Mithaldu)
Brian Wightman (MidLifeXis)
Zaki Mughal (zmughal)
mohawk (mohawk2, ETJ)
Vikas N Kumar (vikasnkumar)
Flavio Poletti (polettix)
Salvador Fandiño (salva)
Gianni Ceccarelli (dakkar)
Pavel Shaydo (zwon, trinitum)
Kang-min Liu (劉康民, gugod)
Nicholas Shipp (nshp)
Juan Julián Merelo Guervós (JJ)
Joel Berger (JBERGER)
Petr Pisar (ppisar)
Lance Wicks (LANCEW)
Ahmad Fatoum (a3f, ATHREEF)
José Joaquín Atria (JJATRIA)
Duke Leto (LETO)
Shoichi Kaji (SKAJI)
Shawn Laffan (SLAFFAN)
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.