<> = Debian Ruby Team Packaging Conventions = == Naming Convention == * Naming format of libruby-* is deprecated * Underscores are replaced by hyphens * Binary packages * If the software is a library (it is often included in other programs, rather than being used as an executable), a '''ruby-''' prefix is added. Example: '''ruby-flowdock'''. If the gem name already contains the word ruby, it is removed in favour of the ruby- prefix. Example: '''ruby_parser''' becomes '''ruby-parser''' and '''messagebus_ruby_api''' becomes '''ruby-messagebus-api''' * If the software is a Ruby application (being executed), no ruby- prefix is added. Example: '''gitlab''' * Source packages should have same name as main primary package == Licensing Convention == * The files inside debian subdirectory are put under the same license of the gem. == Single package policy == Since Wheezy, Ruby software must not come in separate packages per Ruby interpreter version, as we did until Squeeze ('''libfoo-ruby1.8''', '''libfoo-ruby1.9.1''' etc). We use a single binary package per source package no matter what. In the case of native extensions, those single binary packages will contain the compiled extensions (*.so) for all supported Ruby versions. This is supported by gem2deb, so you should use it. == Handling shebangs == Ruby applications should use '''/usr/bin/ruby''', and depend on '''ruby | ruby-interpreter'''. gem2deb currently does the following: * If the '''XS-Ruby-Versions''' field contains 'all', all shebangs of programs installed to '''/usr/bin''' are rewritten to '''/usr/bin/ruby''' * If several versions of the interpreter were supported by gem2deb (as it was the case for Wheezy), all shebangs of programs installed to /usr/bin would be rewritten to the binary corresponding to the first version listed in XS-Ruby-Versions. For example, is XS-Ruby-Versions is '''ruby2.1, ruby2.2''', all shebangs would be rewritten to '''/usr/bin/ruby2.1''' === Values of XS-Ruby-Versions === The XS-Ruby-Versions values match the name of the ruby interpreter, or {{{all}}} if the package is supposed to work with every supported version of the interpreter. For Wheezy, supported values were: * all * ruby1.8 * ruby1.9.1 For Jessie, only one version of the interpreter is included. The valid values are: * ruby2.1 * all For Stretch, only one version of the interpreter will be included. The valid values are: * ruby2.2 (temporary in unstable) * ruby2.3 * all When more ruby interpreters will be added, the list will be expanded.