Use this section if you want your package to start with Ruby source code that contains a setup.rb file. There are no special superclasses dedicated to Ruby; you only need to use the PackageRecipe base class from Conary.
Use the following template to start this basic recipe for packaging a Ruby application:
# RECIPE TEMPLATE
# Package an application from Ruby source code that includes a setup.rb file
class ExampleApp(PackageRecipe):
name = 'example'
version = '1.0'
buildRequires = []
def setup(r):
r.addArchive('http://www.example.com/example/'
'%(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")
Replace the class name, package name, version, and archive location as appropriate for your package. Each source or archive you add can be just a file name (if you're checking in those files with the recipe), a network-accessible location as shown in the template example, or a version control checkout action from among Conary's source actions.
Reference all the other actions you can add to your recipe in Conary Recipe Actions, Macros, and Variables at docs.rpath.com/conary.