1
0
mirror of https://github.com/jordansissel/fpm synced 2024-12-22 00:34:15 +01:00
fpm/examples/api/multiple-to-rpm.rb
2012-02-29 17:15:41 -08:00

19 lines
445 B
Ruby

$: << File.join(File.dirname(__FILE__), "..", "..", "lib")
require "fpm"
package = FPM::Package::Gem.new
ARGV.each do |gem|
name, version = gem.split(/[=]/, 2)
package.version = version # Allow specifying a specific version
package.input(gem)
end
rpm = package.convert(FPM::Package::RPM)
rpm.name = "rubygem-manythings"
rpm.version = "1.0"
begin
output = "NAME-VERSION.ARCH.rpm"
rpm.output(rpm.to_s(output))
ensure
rpm.cleanup
end