RPM::Make 0.8 review

Download
by rbytes.net on

RPM::Make is a Perl module to cleanly generate an RPM. SYNOPSIS use RPM::Make; # The "Manifest": list of files that

License: Perl Artistic License
File size: 16K
Developer: Scott Harrison
0 stars award from rbytes.net

RPM::Make is a Perl module to cleanly generate an RPM.

SYNOPSIS

use RPM::Make;

# The "Manifest": list of files that will comprise the software package.
my @filelist=('tmproot/file1.txt',
'tmproot/file2.txt',
'tmproot/file3.txt',
'tmproot/file4.txt');

my %doc; my %conf; my %confnoreplace; my %metadata;

# Define special handling of files.
$doc{'tmproot/file1.txt'}=1;
$conf{'tmproot/file2.txt'}=1;
$confnoreplace{'tmproot/file3.txt'}=1;

# Bare minimum metadata (descriptive data of the software package).
my $pathprefix='tmproot'; # Location of files to be included in package.
my $tag='Test'; # Default name of the software package.
my $version='0.1'; # Version number.
my $release='1'; # Release number (versions can have multiple releases).

# Highly descriptive metadata.
%metadata=(
'vendor'=>'Excellence in Perl Laboratory',
'summary'=>'Test Software Package',
'name'=>$tag,
'copyrightname'=>'...',
'group'=>'Utilities/System',
'AutoReqProv'=>'no',
'requires'=>[('PreReq: setup',
'PreReq: passwd',
'PreReq: util-linux'
)],
'description'=>'This package is generated by RPM::Make. '.
'This implements the '.$tag.' software package',
'pre'=>'echo "You are installing a package built by RPM::Make; '.
'RPM::Make is available at http://www.cpan.org/."',
);

# Temporary "sandbox" (this should not be /tmp because this is deleted!).
my $buildloc='TempBuildLoc';

# The "execute" subroutine coordinates all of the RPM building steps.
RPM::Make::execute($tag,$version,$release,$arch,$buildloc,$pathprefix,
@filelist,%doc,%conf,%confnoreplace,
%metadata);

# You can also build an RPM in more atomic steps; these three smaller
# steps are equivalent to the execute command.

# Step 1: Generate the rpm source location.
RPM::Make::rpmsrc($tag,$version,$release,$buildloc,$pathprefix,
@filelist,%doc,%conf,%confnoreplace,
%metadata);

# Step 2: Build the rpm and copy into the invoking directory.
RPM::Make::compilerpm($buildloc,$metadata{'name'},$version,
$release,$arch,
$currentdir,$invokingdir);

# Step 3: Clean the location used to gather and build the rpm.
RPM::Make::cleanbuildloc($buildloc);

Requirements:
Perl

RPM::Make 0.8 keywords