Coder Social home page Coder Social logo

rpm's Introduction

rpm

Generates RPM packages from Ruby gems and Rails projects.

installation

via git

git clone git://github.com/sinisterchipmunk/rpm.git
cd rpm
rake install

via gem

gem install rpm

usage

# set up the ruby-rpm template
ruby-rpm install

# edit the ruby-rpm RPM template to your liking
vi ./rpm/application.spec.erb

# generate the RPM
ruby-rpm

output

The RPM generator will first generate the application spec from your spec template. This is in:

rpm/application.spec

Next, it will attempt to build the RPM. The package is built in:

rpm/build

Note that the build directory is not emptied upon completion. However, it is emptied prior to generating a new RPM.

After the build, all resultant RPMs (except source RPMs) are copied into:

rpm/pkg

In Rails projects, the RPM generator will create or update a file called:

rpm/RELEASE

This is a single-number revision which is incremented every time you build an RPM. You can modify this file directly to start at a specific release number. In Rails projects, the version number of the RPM is always 1.0 (though you can change this by modifying the spec template – see above).

For Ruby gems, the RPM version is set to the gem version as found in the gemspec file. In fact, most of the RPM information comes directly from the gemspec file. By default, gem RPMs are prefixed with “rubygem-”. See the API documentation for how to modify this, or just hard-code the gem name in the spec template yourself.

other notes

Note that for gems, the RPM generator will simply use the dependencies listed in the gemspec. It won’t actually build those dependencies, however, so you’ll need to build a separate RPM for each gem depended upon.

For Rails projects, the generator assumes you are using Bundler. If not, you’ll need to make the appropriate changes to your spec template manually.

For Rails projects, by default, the spec template will package and install the bundle without development, test, and cucumber groups (that is, just “production” gems for the vast majority of Rails apps). If you want an RPM for a test environment, alter the spec to taste.

This RPM generator has been tested exclusively in my own dev and prod environments. Your mileage may vary. I’m perfectly happy to address any shortcomings (just open an issue) but be aware that I may need your help to test in environments I can’t easily match.

Enjoy!

rpm's People

Contributors

sinisterchipmunk avatar

Watchers

James Cloos avatar Alex Pham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.