Navigation: Debian/Ruby Extras / Ruby Package Tools / The CDBS Classes Language: en WikiLink: The CDBS Classes

The CDBS Classes

The tools includes two CDBS classes, ruby-setup-rb.mk and ruby-extconf-rb.mk, for automating the building of a package for upstream source that uses install.rb, setup.rb or extconf.rb as builder/installer. The classes try to create a package that adheres to the Debian/Ruby policy (draft version) and takes a lot of common standard and often the same work out of your hands.

Basic usage

A common debian/rules file for setup.rb using this ruby-setup-rb class would look like this:

#!/usr/bin/make -f
#
# CDBS file to build the Foo Ruby package.

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk

libbreakpoint-ruby is an example of a setup.rb based Debian package.

For extconf.rb it would look like this:

#!/usr/bin/make -f
#
# CDBS file to build the Foo Ruby package.

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/ruby-pkg-tools/1/class/ruby-extconf-rb.mk

You can have a look at libgpgme-ruby to see how an extconf.rb based package can be built.

Note that it is still possible to configure and override the behaviour of the class and debhelper. No control is lost. For more information about how to use the class, see the CDBS HOWTO.

N.B. When using either of these classes, don’t forget to add