X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=fdf0b2fc198703fd4939cad10ca3d744f8fecf78;hb=398d2dd71bb4a8a7ca7cb7e792876cb792529f3a;hp=7fab73a43b693e5817857f0261481292115a6669;hpb=88382900dcd1a7b94384f5bebf6f6c47bf610613;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 7fab73a..fdf0b2f 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -3,17 +3,22 @@ package CPANPLUS::Dist::Gentoo; use strict; use warnings; -use Cwd qw/abs_path/; +use Cwd (); +use List::Util qw; use File::Copy (); use File::Path (); use File::Spec; +use POSIX (); -use IPC::Cmd qw/run can_run/; +use IPC::Cmd (); +use Parse::CPAN::Meta (); -use CPANPLUS::Error; +use CPANPLUS::Error (); -use base qw/CPANPLUS::Dist::Base/; +use base qw; +use CPANPLUS::Dist::Gentoo::Atom; +use CPANPLUS::Dist::Gentoo::Guard; use CPANPLUS::Dist::Gentoo::Maps; =head1 NAME @@ -22,36 +27,179 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds. =head1 VERSION -Version 0.07 +Version 0.12 =cut -our $VERSION = '0.07'; +our $VERSION = '0.12'; =head1 SYNOPSIS + # Using default values from your make.conf + cpan2dist --format=CPANPLUS::Dist::Gentoo --buildprereq Some::Module + + # Specifying your own options cpan2dist --format=CPANPLUS::Dist::Gentoo \ --dist-opts overlay=/usr/local/portage \ --dist-opts distdir=/usr/portage/distfiles \ --dist-opts manifest=yes \ --dist-opts keywords=x86 \ - --dist-opts header="# Copyright 1999-2008 Gentoo Foundation" \ + --dist-opts header="# Begin" \ --dist-opts footer="# End" \ Any::Module You::Like -=head1 DESCRPITON +=head1 DESCRIPTION + +This module is a CPANPLUS backend that recursively generates Gentoo ebuilds for a given package in the default overlay, updates the manifest, and even emerges it (together with its dependencies) if the user requires it. + +The generated ebuilds are placed into the C category. +They favour depending on a C, on C, C or C (in that order) rather than C. +Existing ebuilds will be searched into the main C portage tree and then into the overlays listed in C. + +=head1 OPTIONS + +You can pass specific options to L by using the C<--dist-opts> command-line argument followed by a C pair, where C is the option name and C is what it is set to. +C<--dist-opts> can be used several times. + +The valid option Cs are : + +=over 4 + +=item * + +C + +A boolean that indicates whether the F file should be generated by running C onto the generated ebuilds. + +Defaults to C. + +=item * + +C + +The path of the overlay in which the generated ebuilds will be written. + +Defaults to the first overlay listed in C (as returned by C) or F if this variable is empty. + +=item * + +C + +The directory where C expects to find the source tarballs. +You need write permissions on this directory. + +Defaults to the value of C (as returned by C) or F if this variable is empty. + +=item * + +C + +The valid C for the generated ebuilds. + +Defaults to the value of C (as returned by C) or C<'x86'> if this variable is empty. + +=item * + +C
+ +A chunk of text that is prepended to every ebuild. + +Defaults to the generic Gentoo Foundation header. + +=item * + +C