NAME
CPANPLUS::Dist::Slackware::PackageDescription - Collect information on a new Slackware compatible package
VERSION
This document describes CPANPLUS::Dist::Slackware::PackageDescription version 1.030.
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 "i586" 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-i586-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-i586-1_CPANPLUS.tgz.
- $pkgdesc->installdirs
-
Returns "vendor" or "site".
- $pkgdesc->prefix
-
Returns the directory below which the package will be installed, e.g. "/usr" or "/usr/local".
- $pkgdesc->bindir
-
Returns the location of executables, e.g. "/usr/bin".
- $pkgdesc->mandirs
-
Returns a map of manual page directories, e.g. (1 => "/usr/man/man1", 3 => "/usr/man/man3").
- $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
See CPANPLUS::Dist::Slackware.
INCOMPATIBILITIES
None known.
SEE ALSO
CPANPLUS::Dist::Slackware
AUTHOR
Andreas Voegele <voegelas@cpan.org>
BUGS AND LIMITATIONS
Please report any bugs using the issue tracker at https://github.com/graygnuorg/CPANPLUS-Dist-Slackware/issues.
LICENSE AND COPYRIGHT
Copyright 2012-2020 Andreas Voegele
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See https://dev.perl.org/licenses/ for more information.