NAME
RPM4::Spec
SYNOPSIS
DESCRIPTION
Extend method availlable on RPM4::Spec objects
METHODS
new(file, var => value, ...)
Create a RPM4::Spec
instance, only the file values is mandatory.
- file
-
The spec file from wich to create the object
- passphrase
-
If specified, the passphrase will be used for gpg signing after build.
- rootdir
-
If specified, root dir will be use root instead '/'.
-
the cookies is string rpm will put into RPMCOOKIES tag, a way to know if a rpm has been built from a specific src. You get this value from installsrpm.
- anyarch
-
If set, you'll get a spec object even the spec can't be build on the current %_target_cpu. Notice if you set this value, starting a build over the spec object will works !
- force
-
Normally, source analyze is done during spec parsing, getting a spec object failed if a source file is missing, else you set force value.
TAKE CARE: if force is set, rpm will not check source type, so patch will NOT be gunzip/bunzip... If you want to compile the spec, don't set it to 1, if you just want run clean/packagesource stage, setting force to 1 is ok.
By default anyarch and force are set to 0.
RPM4::Spec->srcheader()
Returns a RPM4::Header object like source rpm will be. Please notice that the header is not finish and header information you'll get can be incomplete, it depend if you call the function before or after RPM4::Spec->build().
RPM4::Spec->srcrpm()
Returns the source filename spec file will build. The function take care about rpmlib configuration (build dir path).
RPM4::Spec->binrpm()
Returns files names of binaries rpms that spec will build. The function take care about rpmlib configuration (build dir path).
RPM4::Spec->build([ @actions ])
Run build process on spec file. Each value in @actions is one or more actions to do:
- PACKAGESOURCE: build source package,
- PREP: run prep stage,
- BUILD: run build stage,
- INSTALL: run install stage,
- CHECK: check installed files,
- FILECHECK: check installed files,
- PACKAGEBINARY: build binaries packages,
- CLEAN: run clean stage,
- RMSPEC: delete spec file,
- RMSOURCE: delete sources files,
- RMBUILD: delete build files,
rpmbuild($flags, %options)
Build a spec using rpm same rpm options.
$flags should be -b[abspci]
%options is a list of optionnal options:
- db
-
reuse an already existing RPM4::Db object (else a new one is created)
- clean
-
if set, clean source and build tre (like rpmbuild --clean
- rmspec
-
if set, delete the spec after build (like rpmbuild --rmspec)
- nodeps
-
If set, don't check dependancies before build
- shortcircuit
-
if set, run only the build stage asked, not all preceding (like rpmbuild --short-circuit)