Ruby GEM to RPM all in one go

This is my first attempt at building RPM packages for Ruby GEMS. https://gist.github.com/1885411


Requirements:

  1. yum install rpmdevtools
  2. yum install ruby rubygems rubygem-gem2rpm


How to run:

$ ruby make_rpms.rb -t ~/tmp/rpm-gem-packaging/ -n mechanize -r 2.2.1

This will download the gem and dependencies and generate SRPM and RPM files in the following folder:
~/tmp/rpm-gem-packaging/rpmbuild/

NOTE: The status of SUCCESS and FAILURE can be seen in the file:
~/tmp/rpm-gem-packaging/rpmbuild/status.txt

Check for RPM and SRPM files which were generated:

$ cd ~/tmp/rpm-gem-packaging/
$ tree rpmbuild/{RPMS,SRPMS}

About these ads