At any given time, the package ruby
will represent the current
default Debian Ruby version.
The default Debian Ruby version should alway be the latest stable upstream release that can be integrated in the distribution.
Apart from the default version, legacy versions of Ruby may be included as well in the distribution, as long as they are needed by other packages, or as long as it seems reasonable to provide them. (Note: For the scope of this document, Ruby versions are synonymous to feature releases, i.e. Ruby 1.6 and 1.6.8 are subminor versions of the same Ruby version 1.6, but Ruby 1.8 and 1.9 are indeed different versions.)
In addition, unstable/development version of Ruby may be included in the unstable distribution.
For any version, the main package must be called
rubyX.Y
. Names of related packages must
include the rubyX.Y
part.
For every Ruby version provided in the distribution, the package
librubyX.Y
shall comprise a complete
distribution for deployment of Ruby modules and the package
rubyX.Y
shall comprise a complete
distribution for deployment of Ruby scripts. Note that some ruby applications
don't require ruby
, instead these require mod_ruby
or
eruby
. The librubyX.Y
includes
core modules of the upstream Ruby distribution and the
rubyX.Y
package includes the binary
/usr/bin/rubyX.Y
.
Some tools and files for the development of Ruby modules are split off
in a separate package rubyX.Y-dev
. Some
modules in upstream Ruby distribution will be provided in separate packages.
Documentation will be provided separately as well.
At any time, exactly one package, called ruby
must contain a
binary /usr/bin/ruby
, which is symlink to the
/usr/bin/rubyX.Y
, the default version of
Ruby.
Ruby scripts depending on the default Ruby version (see Main
package, Section 1.2) or not depending on a specific Ruby version should
use ruby
(unversioned) as the interpreter name.
Ruby scripts that only work with a specific Ruby version must explicitly use
the versioned interpreter name (rubyX.Y
).
The path name for the Ruby interpreter is /usr/bin/ruby
or
/usr/bin/rubyX.Y
.
If a maintainer would like to provide the user with the possibility to override
the Debian Ruby interpreter, he may want to use /usr/bin/env ruby
or /usr/bin/env rubyX.Y
.
The Ruby library is provided by librubyX.Y
.
The package installs
/usr/lib/librubyX.Y.so.X.Y.Z
(soname is
librubyX.Y.so.X.Y) and
/usr/lib/librubyX.Y.so.X.Y
.
Note that ruby version 1.6 used libruby.so.1.6.
Some tools and files for development of ruby modules are packaged as
rubyX.Y-dev
. This package provides
/usr/lib/ruby/X.Y/mkmf.rb
,
/usr/lib/librubyX.Y.so
and header files,
static library in Config::CONFIG['archdir'].
Note that ruby 1.6 (ruby1.6-dev) provides /usr/lib/libruby.so
.
TODO: we should install header files in
/usr/include/rubyX.Y/
?
The module search path ($LOAD_PATH or $:) is searched in the following order:
/usr/local/lib/site_ruby/X.Y (Config::CONFIG['sitelibdir']) /usr/local/lib/site_ruby/X.Y/GNU-SYSTEM (Config::CONFIG['sitearchdir']) /usr/local/lib/site_ruby (Config::CONFIG['sitedir']) /usr/lib/ruby/X.Y (Config::CONFIG['rubylibdir']) /usr/lib/ruby/X.Y/GNU-SYSTEM (Config::CONFIG['archdir']) .
TODO: What about /usr/share/ruby/X.Y
?
System administrator can install ruby modules to
/usr/local/lib/site_ruby/X.Y/
(for arch
independent modules),
/usr/local/lib/site_ruby/X.Y/GNU-SYSTEM/
(for arch dependent modules) or /usr/local/lib/site_ruby/
(for
version independent modules). Note that ruby module packages MUST not use
these directories.
TODO: We should make some policy to use refe
.
Debian Ruby Policy
version 0.0.1.4