class RPM::Spec

Defined in:

rpm/spec.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(specfile : String, flags : LibRPM::SpecFlags, buildroot : String?, rootdir : String? = "/") #

[View source]

Class Method Detail

def self.open(specfile : String, flags : LibRPM::SpecFlags = LibRPM::SpecFlags::FORCE | LibRPM::SpecFlags::ANYARCH, buildroot : String? = nil, rootdir : String? = "/") #

Open a specfile

This method gives reasonable defaults for each parameters.


[View source]

Instance Method Detail

def build(*, build_amount : BuildFlags, pkg_flags : BuildPkgFlags = BuildPkgFlags::NONE, transaction : Transaction? = nil) #

Build the package

Build the package with specified steps in build_amount. Pre-build check and other conditions may be set via pkg_flags. If a transaction is given, use it as a transaction while building the package. transaction parameter only affects on rpm >= 4.15.0. Otherwise it will be ignored. If transaction is not given for rpm >= 4.15.0, this method creates new one.

If the package built seccessfully, returns true. Otherwise returns false.


[View source]
def buildconflicts #

Returns array of BuildConflicts specified in the spec file.


[View source]
def buildrequires #

Returns array of BuildRequires specified in the spec file.


[View source]
def buildroot #

Returns buildroot associated with the specfile.

Warning: In rpm 4.9 or later, this is the result of expanding %{buildroot}. So, if you open two or more specfiles simultaneously, you may get incorrect result.


[View source]
def finalize #

Cleanup


[View source]
def header : RPM::Package #

Header data would be stored into SRPM, as a RPM::Package.

Warning: In rpm 4.8, this method returns the header data from buildRestrictions. Some tags may not be set.


[View source]
def packages #

Returns array of packages defined in the spec file.


[View source]
def ptr : LibRPM::Spec #

[View source]
def sources #

Returns array of sources defined in the spec file.


[View source]