Returs true for documentation files.
# File lib/gem2rpm/rpm_file.rb, line 27 def doc? Helpers.check_str_on_conditions(self, Gem2Rpm::Configuration.instance.rule_for(:doc)) end
Returns true for files which should be ommited from the package.
# File lib/gem2rpm/rpm_file.rb, line 37 def ignore? Helpers.check_str_on_conditions(self, Gem2Rpm::Configuration.instance.rule_for(:ignore)) end
Returns true for license files.
# File lib/gem2rpm/rpm_file.rb, line 32 def license? Helpers.check_str_on_conditions(self, Gem2Rpm::Configuration.instance.rule_for(:license)) end
Returns true for other known miscellaneous files.
# File lib/gem2rpm/rpm_file.rb, line 47 def misc? Helpers.check_str_on_conditions(self, Gem2Rpm::Configuration.instance.rule_for(:misc)) end
Returns true for files which are part of package test suite.
# File lib/gem2rpm/rpm_file.rb, line 42 def test? Helpers.check_str_on_conditions(self, Gem2Rpm::Configuration.instance.rule_for(:test)) end
Returns string with entry suitable for RPM .spec file. This typically includes all necessary macros depending on file categorization.
# File lib/gem2rpm/rpm_file.rb, line 8 def to_rpm config = Gem2Rpm::Configuration.instance case when license? "#{config.macro_for(:license)} #{config.macro_for(:instdir)}/#{self}".strip when doc? "#{config.macro_for(:doc)} #{config.macro_for(:instdir)}/#{self}".strip when ignore? "#{config.macro_for(:ignore)} #{config.macro_for(:instdir)}/#{self}".strip # /lib should have its own macro when self == 'lib' "#{config.macro_for(:libdir)}" else "#{config.macro_for(:instdir)}/#{self}" end end