X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=ef52fe895d2d6c8d78bbe2d9d2cf064e1e92b76f;hb=ca7d672a00d3f27fe2b037efb4e0bca692b3f800;hp=d5a7b79dd375add110e358c90717d0217ad8268c;hpb=5af07d69e53872ebe1bdea02e0e880141eacd862;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index d5a7b79..ef52fe8 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -4,7 +4,7 @@ use strict; use warnings; use Cwd (); -use List::Util qw/reduce/; +use List::Util qw; use File::Copy (); use File::Path (); use File::Spec; @@ -14,7 +14,7 @@ use Parse::CPAN::Meta (); use CPANPLUS::Error (); -use base qw/CPANPLUS::Dist::Base/; +use base qw; use CPANPLUS::Dist::Gentoo::Atom; use CPANPLUS::Dist::Gentoo::Guard; @@ -26,98 +26,171 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds. =head1 VERSION -Version 0.10 +Version 0.11 =cut -our $VERSION = '0.10'; +our $VERSION = '0.11'; =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 specified overlay (defaults to F), updates the manifest, and even emerges it (together with its dependencies) if the user requires it. -You need write permissions on the directory where Gentoo fetches its source files (usually F). -The valid C for the generated ebuilds are by default those given in C, but you can specify your own with the C dist-option. +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 INSTALLATION +=head1 OPTIONS -Before installing this module, you should append C to your F file. +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. -You have two ways for installing this module : +The valid option Cs are : =over 4 =item * -Use the perl overlay located at L. -It contains an ebuild for L. +C + +A boolean that indicates whether the F file should be generated by running C onto the generated ebuilds. + +Defaults to C. =item * -Bootstrap an ebuild for L using itself. -Note that if your Gentoo system C is C<5.8.x>, L and its dependencies are not installed and not even available in the main portage tree. -So you need to bootstrap them as well. +C -First, fetch tarballs for L and L : +The path of the overlay in which the generated ebuilds will be written. - $ cd /tmp - $ wget http://search.cpan.org/CPAN/authors/id/B/BI/BINGOS/CPANPLUS-0.9003.tar.gz - $ wget http://search.cpan.org/CPAN/authors/id/V/VP/VPIT/CPANPLUS-Dist-Gentoo-0.10.tar.gz +Defaults to the first overlay listed in C (as returned by C) or F if this variable is empty. -Log in as root and unpack them in e.g. your home directory : +=item * - # cd - # tar xzf /tmp/CPANPLUS-0.9003.tar.gz - # tar xzf /tmp/CPANPLUS-Dist-Gentoo-0.10.tar.gz +C -Set up environment variables so that the toolchain is temporarily available : +The directory where C expects to find the source tarballs. +You need write permissions on this directory. - # export OLDPATH=$PATH - # export PATH=/root/CPANPLUS-0.9003/bin:$PATH - # export PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.10/blib/lib:/root/CPANPLUS-0.9003/lib:/root/CPANPLUS-0.9003/inc/bundle +Defaults to the value of C (as returned by C) or F if this variable is empty. -Make sure you don't have an old C<.cpanplus> configuration visible : +=item * - # [ -d /root/.cpanplus ] && mv /root/.cpanplus{,.bak} +C -Bootstrap L : +The valid C for the generated ebuilds. - # cd /root/CPANPLUS-Dist-Gentoo-0.10 - # samples/g-cpanp CPANPLUS +Defaults to the value of C (as returned by C) or C<'x86'> if this variable is empty. -Reset the environment : +=item * + +C
+ +A chunk of text that is prepended to every ebuild. - # export PATH=$OLDPATH - # unset PERL5LIB OLDPATH +Defaults to the generic Gentoo Foundation header. -Emerge L with the ebuilds you've just generated : +=item * + +C