Andreas Vögele > CPANPLUS-Dist-Slackware-1.017 > CPANPLUS::Dist::Slackware::PackageDescription

Download:
CPANPLUS-Dist-Slackware-1.017.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.017   Source  

NAME ^

CPANPLUS::Dist::Slackware::PackageDescription - Collect information on a package

VERSION ^

version 1.017

SYNOPSIS ^

    use CPANPLUS::Dist::Slackware::PackageDescription;

    $pkgdesc = CPANPLUS::Dist::Slackware::PackageDescription->new(
        module => $modobj,
        tag    => '_MYTAG',
        type   => 'txz'
    );

    $filename = $pkgdesc->filename();
    $summary  = $pkgdesc->summary();
    $desc     = $pkgdesc->slack_desc();
    @docfiles = $pkgdesc->docfiles();

DESCRIPTION ^

This module gets information on a yet-to-be-created Slackware compatible package. The information is obtained from a CPANPLUS::Module object, the file system and the environment. Among other things, the module translates a Perl distribution's name and version into a package name. It tries to find a short summary that describes the distribution. It can build a slack_desc description for you. It finds standard documentation files like README and Changes.

SUBROUTINES/METHODS ^

CPANPLUS::Dist::Slackware::PackageDescription->new(%attrs)

Returns a newly constructed object.

    $pkgdesc = CPANPLUS::Dist::Slackware::PackageDescription->new(
        module => $modobj,
        %attrs
    );

The CPANPLUS::Module object is mandatory. All other attributes are optional.

$pkgdesc->module

Returns the CPANPLUS::Module object that was passed to the constructor.

$pkgdesc->normalized_name

Returns the package name, e.g. "perl-Some-Module".

$pkgdesc->normalized_version

Returns the package version, e.g. "0.01".

$pkgdesc->distname

Returns the package name and version, e.g. "perl-Some-Module-0.01".

$pkgdesc->build

Returns the package's build number. Defaults to $ENV{BUILD} or "1".

$pkgdesc->set_build

Sets the package's build number.

$pkgdesc->arch

Returns the package architecture. If unset, either the value of $ENV{ARCH} or a platform-specific identifier like "i486" is returned.

$pkgdesc->tag

Returns a tag that is added to the package filename. Defaults to $ENV{TAG} or "_CPANPLUS".

$pkgdesc->type

Returns the package extension. Defaults to $ENV{PKGTYPE} or "tgz". Other possible values are "tbz", "tlz" and "txz".

$pkgdesc->filename

Returns the package's filename, e.g. perl-Some-Module-0.01-i486-1_CPANPLUS.tgz.

$pkgdesc->outputdir

Returns the directory where all created packages are stored. Defaults to $OUTPUT, $TMPDIR or /tmp.

$pkgdesc->outputname

Returns the package's full filename, e.g. /tmp/perl-Some-Module-0.01-i486-1_CPANPLUS.tgz.

$pkgdesc->docdir

Returns the packages's documentation directory, e.g. /usr/doc/perl-Some-Module-0.01.

$pkgdesc->docfiles

Returns a list of standard documentation files that the distribution contains, e.g. ("Changes", "LICENSE, "README"). The filenames are relative to the distribution's top-level directory.

Must be called after the distribution has been extracted.

$pkgdesc->summary

Returns a description of the distribution's purpose, e.g. "Drop atomic bombs on Australia".

Must not be called before the distribution has been extracted. Gives better results when called after the distribution has been built, i.e. when the "blib" directory is available.

$pkgdesc->config_function

Returns a config shell function that can be added to the doinst.sh script in the package's install directory.

Only the shell function is returned. You have to add the config function calls for each configuration file yourself.

$pkgdesc->slack_desc

Returns a Slackware package description that can be written to the slack-desc file in the package's install directory.

$pkgdesc->build_script

Returns a build script that can be written to perl-Some-Module.SlackBuild in the package's documentation directory.

$pkgdesc->readme_slackware

Returns the text of a README.SLACKWARE file that can be stored in the package's documentation directory. The returned document lists the build dependencies. You can add more text to this document, e.g. a list of configuration files provided by the package.

$pkgdesc->destdir

Returns the staging directory where the distribution is temporarily installed, e.g. /tmp/CPANPLUS/package-perl-Some-Module-01yEr7X43K. Defaults to a package-specific subdirectory in $TMP or /tmp/CPANPLUS.

DIAGNOSTICS ^

None.

CONFIGURATION AND ENVIRONMENT ^

See above and CPANPLUS::Dist::Slackware for supported environment variables.

DEPENDENCIES ^

Requires the modules File::Spec, File::Temp, Pod::Find, Pod::Simple, POSIX, Text::Wrap, and version 0.77. If available, the module Parse::CPAN::Meta is used.

INCOMPATIBILITIES ^

None known.

SEE ALSO ^

CPANPLUS::Dist::Slackware

AUTHOR ^

Andreas Voegele <voegelas@cpan.org>

BUGS AND LIMITATIONS ^

Please report any bugs to bug-cpanplus-dist-slackware at rt.cpan.org, or through the web interface at http://rt.cpan.org/.

LICENSE AND COPYRIGHT ^

Copyright 2012, 2013 Andreas Voegele

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

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: