Conary:Ruby App Template
From rPath Wiki
Conary packagers can write a package recipe to package a Ruby application that contains a setup.rb file in the distribution. This recipe inherits directly from the PackageRecipe class in Conary.
Use the following template to start the recipe, and make the changes suggested:
class MyApp(PackageRecipe): name = 'myapp' version = '1.0' buildRequires = [] def setup(r): r.addArchive('http://www.example.com/foo/' '%(name)s-%(version)s.tar.bz2', dir='/opt/%(name)s/') r.Run('ruby setup.rb config') r.Run('ruby setup.rb setup') r.Run('ruby setup.rb install --prefix="%(destdir)s"')
Suggested changes:
- Change the class name to a CamelCase representation of the application name
- Change the value for name to the application name as packaged
- Change the value for version to the application version
- After cooking (with cvc) or building (with rMake), add items to the buildRequires section as instructed by the build messages (see Conary Recipe Structure for more information); remove the buildRequires line altogether if it is not needed
- Change the URL to reflect the location of the application
- Change the value of the dir option in addArchive as necessary
