CPANPLUS::Dist::RPM - a CPANPLUS backend to build RPM
cpan2dist --format=CPANPLUS::Dist::RPM Some::Random::Package
CPANPLUS::Dist::RPM is a distribution class to create RPM packages from CPAN modules, and all its dependencies. This allows you to have the most recent copies of CPAN modules installed, using your package manager of choice, but without having to wait for central repositories to be updated.
You can either install them using the API provided in this package, or manually via rpm.
Note that these packages are built automatically from CPAN and are assumed to have the same license as perl and come without support. Please always refer to the original CPAN package if you have questions.
Return a boolean indicating whether or not you can use this package to create and install modules in your environment.
It will verify if you have all the necessary components available to build your own rpm packages. You will need at least these dependencies installed: rpm, rpmbuild and gcc.
Sets up the CPANPLUS::Dist::RPM object for use. Creates all the needed status accessors.
Called automatically whenever you create a new CPANPLUS::Dist object.
Prepares a distribution for creation. This means it will create the rpm spec file needed to build the rpm and source rpm. This will also satisfy any prerequisites the module may have.
Note that the spec file will be as accurate as possible. However, some fields may wrong (especially the description, and maybe the summary) since it relies on pod parsing to find those information.
Returns true on success and false on failure.
You may then call $rpm->create on the object to create the rpm from the spec file, and then $rpm->install on the object to actually install it.
Builds the rpm file from the spec file created during the create() step.
You may then call $rpm->install on the object to actually install it.
Installs the rpm using rpm -U.
/!\ Work in progress: not implemented.
Returns true on success and false on failure
These are only documented here as it may be useful to override them.
Prepare our $status.
Generate and write out the spec file.
Checks to see if an RPM for this module is already installed on the system. Note that we only check the rpmdb; we leave checking package repos to distribution-specific subclasses.
Takes no arguments; returns a hashref of the buildrequires of this module.
Takes no arguments; returns an arrayref of the files which should be included as %doc in the spec.
Takes no arguments; returns true if the module is pure-perl; false otherwise.
Return true if the Makefile.PL is actually a front for Module::Build.
If passed an argument, makes an rpm package name out of it; returns the rpm package name of the module we're operating against if none given.
Get the one-liner summary of the module for %summary.
Get the module's description for %description.
Get the module's license for License:. Note that while this is still incomplete, we now use Software::License to try to figure out the correct license from the .pm/.pod files.
This particular base class does not endeavour to satisfy any Linux distribution's packaging guidelines. It does, however, strive to create clean, sane specs and resulting rpm packages.
Until subclassing, users should not be surprised to note a marked similarity to the Fedora/RedHat Perl packaging guidelines.
We do use Software::License to scan any .pm/.pod files. However, we could and should be checking META.yml and any COPYING/LICENSE files that happen to be bundled.
Right now we provide the description as given by the module in its meta data. However, not all modules provide this meta data and rather than scanning the files in the package for it, we simply default to the name of the module.
Please report any bugs or feature requests to < bug-CPANPLUS-Dist-RPM at rt.cpan.org>, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CPANPLUS-Dist-RPM. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
< bug-CPANPLUS-Dist-RPM at rt.cpan.org>
CPANPLUS::Backend, CPANPLUS::Module, CPANPLUS::Dist, cpan2dist, rpm
CPANPLUS::Dist::RPM development takes place at http://code.google.com/p/cpanplus-dist-rpm/.
You can also look for information on this module at:
AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/CPANPLUS-Dist-RPM
RT: CPAN's request tracker
Originally based on CPANPLUS-Dist-Mdv by:
Jerome Quelin, <jquelin at cpan.org>
<jquelin at cpan.org>
Shlomi Fish ( http://www.shlomifish.org/ ) changed it into CPANPLUS-Dist-Fedora.
Chris Weyl <email@example.com> changed it again to CPANPLUS-Dist-RPM.
Copyright (c) 2007 Jerome Quelin, Shlomi Fish, Chris Weyl.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified by Shlomi Fish, 2008 - all ownership disclaimed.
Modified again by Chris Weyl <firstname.lastname@example.org> 2008.
To install CPANPLUS::Dist::RPM, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.