R Bernard Davison > Software-Packager-Rpm-0.06 > Software::Packager::Rpm

Download:
Software-Packager-Rpm-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  

add_item()

 my %object_data = (
    'SOURCE' => '/source/file1',
    'TYPE' => 'file',
    'KIND' => 'doc',
    'DESTINATION' => '/usr/local/file1',
    'USER' => 'joe',
    'GROUP' => 'staff',
    'MODE' => 0750,
    );
 $packager->add_item(%object_data);

This method overrides the add_item method in Software::Packager. It adds the ability to add extra features used by RPM for each object in the package.

For more details see the documentation in: Software::Packager Software::Packager::Object::Rpm

program_name()

 $packager->program_name('SoftwarePackager');
 my $program_name = $packager->program_name();

This method is used to set the name of the program that the package is installing. This may in should be the same as the package name but that is not required. It must not contain spaces or a dash "-" and must be all on one line.

version()

 $packager->version(1.2.3.4.5.6);
 my $version = $packager->version();

This method sets the version for the package to the passed value. The version passed cannot contain a dash "-" or spaces and must be on one line.

release()

This method sets the release version for the package. The release is the number of times the package has been recreated. If the release is not set then a default of 1 is used. It cannot contain spaces, a dash or new lines.

copyright()

This method sets the copyright type for the package. This should be the name of the copyright

source()

This method sets the source location for the package. This should be the URL for the source package used to create this package.

architecture()

 $packager->architecture("sparc");
 my $arch = $packager->architecture();

This method sets the architecture for the package to the passed value. If no argument is passed then the current architecture is returned. This is the output "from uname -p"

package_name()

 my $name = $packager->package_name();

This method returns the name of the package that will be created.

short_description()

 $packager->short_description("This is a short description.");
 my $description = $packager->short_description();

The short description is just that a short description of the program. It must be all on one line.

description()

 $packager->description("This is the description.");
 my $description = $packager->description();

The description method sets the package description to the passed value. If no arguments are passed the package description is returned.

The discription can be of any length. It will be formatted by RPM in the following way:

package()

This method creates the package and returns true if it is successful else it returns undef

syntax highlighting: