Alien::Package::Rpm(3pUser Contributed Perl DocumentatAlien::Package::Rpm(3pm)
Alien::Package::Rpm - an object that represents a rpm package
This is an object class that represents a rpm package. It is derived
Relocatable rpm packages have a prefixes field.
Detect rpm files by their extention.
Install a rpm. If RPMINSTALLOPT is set in the environement, the
options in it are passed to rpm on its command line.
Implement the scan method to read a rpm file.
Implement the unpack method to unpack a rpm file. This is a little
nasty because it has to handle relocatable rpms and has to do a bit
of permissions fixing as well.
Prepare for package building by generating the spec file.
Delete the spec file.
Build a rpm. If RPMBUILDOPT is set in the environement, the options
in it are passed to rpm on its command line.
An optional parameter, if passed, can be used to specify the pro-
gram to use to build the rpm. It defaults to rpmbuild.
When retreiving the version, remove any dashes in it.
Set/get script fields.
When retrieving a value, we have to do some truely sick mangling.
Since debian/slackware scripts can be anything -- perl programs or
binary files -- and rpm is limited to only shell scripts, we need
to encode the files and add a scrap of shell script to make it
unextract and run on the fly.
When setting a value, we do some mangling too. Rpm maitainer
scripts are typically shell scripts, but often lack the leading
#!/bin/sh This can confuse dpkg, so add the #!/bin/sh if it looks
like there is no shebang magic already in place.
Also, if the rpm is relocatable, the script could refer to
RPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this
by adding code to the script to set RPM_INSTALL_PREFIX.
Set/get arch field. When the arch field is set, some sanitizing is
done first to convert it to the debian format used internally. When
it's retreived it's converted back to rpm form from the internal
Joey Hess <joeyATkitenet.net>
perl v5.8.8 2008-04-29 Alien::Package::Rpm(3pm)