Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ branch:  cross package maker


Check-in [7d94ce620c]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:7d94ce620c74954a57c79b23cffe3692803bad26
Date: 2013-04-22 23:38:02
User: jls
Comment:Update gem-to-rpm.rb
Tags And Properties
  • sym-trunk inherited from [2b439be7d6]
Context
2013-04-30
07:22
[b18fdeb19e] - Add CPAN support. (#74). I've tested this briefly with a few perl modules: Message::Passing and DBI. Both build successfully into rpms and debs. (user: jls, tags: trunk)
2013-04-22
23:38
[7d94ce620c] Update gem-to-rpm.rb (user: jls, tags: trunk)
15:49
[99963e1578] Merge pull request #418 from r4um/fix_rpm_prefix Do no generate empty prefix (user: jls, tags: trunk)
Changes

Changes to examples/api/gem-to-rpm.rb.

1
2
3
4




5
6
7
8
9
10
11
12
$: << File.join(File.dirname(__FILE__), "..", "..", "lib")
require "fpm"

package = FPM::Package::Gem.new




package.input(ARGV[0])
rpm = package.convert(FPM::Package::RPM)
begin
  output = "NAME-VERSION.ARCH.rpm"
  rpm.output(rpm.to_s(output))
ensure
  rpm.cleanup
end




>
>
>
>








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$: << File.join(File.dirname(__FILE__), "..", "..", "lib")
require "fpm"

package = FPM::Package::Gem.new

# the Gem package takes a string name of the package to download/install.
# Example, run this script with 'rails' as an argument and it will convert
# the latest 'rails' gem into rpm. 
package.input(ARGV[0])
rpm = package.convert(FPM::Package::RPM)
begin
  output = "NAME-VERSION.ARCH.rpm"
  rpm.output(rpm.to_s(output))
ensure
  rpm.cleanup
end