Gentoo Development Guide

RUBY-FAKEGEM.ECLASS

Section: portage (5)
Updated: Apr 2014
Index Return to Main Contents
 

NAME

ruby-fakegem.eclass - An eclass for installing Ruby packages to behave like RubyGems.  

DESCRIPTION

This eclass allows to install arbitrary Ruby libraries (including Gems), providing integration into the RubyGems system even for "regular" packages.  

FUNCTIONS

ruby_fakegem_gemsdir
This function returns the gems data directory for the ruby implementation in question.

Return value: Returns the gem data directory

ruby_fakegem_doins file [file...]
Installs the specified file(s) into the gems directory.
ruby_fakegem_newsins() file filename
Installs the specified file into the gems directory using the provided filename.
ruby_fakegem_install_gemspec
Install a .gemspec file for this package. Either use the file indicated by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using ruby_fakegem_genspec.
ruby_fakegem_gemspec_gemspec gemspec-input gemspec-output
Generates an installable version of the specification indicated by RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification in a way similar to packaging the gemspec file.
ruby_fakegem_metadata_gemspec gemspec-metadata gemspec-output
Generates an installable version of the specification indicated by the metadata distributed by the gem itself. This is similar to how rubygems creates an installation from a .gem file.
ruby_fakegem_genspec output-gemspec
Generates a gemspec for the package and places it into the "specifications" directory of RubyGems. If the metadata normally distributed with a gem is present then that is used to generate the gemspec file.

As a fallback we can generate our own version. In the gemspec, the following values are set: name, version, summary, homepage, and require_paths=["lib"]. See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version. See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths.

ruby_fakegem_binwrapper command [path]
Creates a new binary wrapper for a command installed by the RubyGem. path defaults to /usr/bin/$command
all_fakegem_compile
Build documentation for the package if indicated by the doc USE flag and if there is a documetation task defined.
all_ruby_unpack
Unpack the source archive, including support for unpacking gems.
all_ruby_compile
Compile the package.
each_fakegem_test
Run tests for the package for each ruby target if the test task is defined.
each_fakegem_install
Install the package for each ruby target.
each_ruby_install
Install the package for each target.
all_fakegem_install
Install files common to all ruby targets.
all_ruby_install
Install files common to all ruby targets.
 

ECLASS VARIABLES

RUBY_FAKEGEM_NAME
Sets the Gem name for the generated fake gemspec. RUBY_FAKEGEM_NAME="${PN}"
RUBY_FAKEGEM_VERSION
Sets the Gem version for the generated fake gemspec. RUBY_FAKEGEM_VERSION="${PV}"
RUBY_FAKEGEM_TASK_DOC
Specify the rake(1) task to run to generate documentation. RUBY_FAKEGEM_TASK_DOC="rdoc"
RUBY_FAKEGEM_RECIPE_TEST
Specify one of the default testing function for ruby-fakegem:
 - rake (default; see also RUBY_FAKEGEM_TASK_TEST)
 - rspec (calls ruby-ng_rspec, adds dev-ruby/rspec:2 to the dependencies)
 - cucumber (calls ruby-ng_cucumber, adds dev-util/cucumber to the
   dependencies; does not work on JRuby).
 - none RUBY_FAKEGEM_RECIPE_TEST="rake"
RUBY_FAKEGEM_TASK_TEST
Specify the rake(1) task used for executing tests. Only valid if RUBY_FAKEGEM_RECIPE_TEST is set to "rake" (the default). RUBY_FAKEGEM_TASK_TEST="test"
RUBY_FAKEGEM_RECIPE_DOC
Specify one of the default API doc building function for ruby-fakegem:
 - rake (default; see also RUBY_FAKEGEM_TASK_DOC)
 - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies);
 - yard (calls `yard`, adds dev-ruby/yard to the dependencies);
 - none RUBY_FAKEGEM_RECIPE_DOC="rake"
RUBY_FAKEGEM_DOCDIR
Specify the directory under which the documentation is built; if empty no documentation will be installed automatically. Note: if RUBY_FAKEGEM_RECIPE_DOC is set to `rdoc`, this variable is hardwired to `doc`. RUBY_FAKEGEM_DOCDIR=""
RUBY_FAKEGEM_EXTRADOC
Extra documentation to install (readme, changelogs, …). RUBY_FAKEGEM_EXTRADOC=""
RUBY_FAKEGEM_DOC_SOURCES
Allow settings defined sources to scan for documentation. This only applies if RUBY_FAKEGEM_DOC_TASK is set to `rdoc`. RUBY_FAKEGEM_DOC_SOURCES="lib"
RUBY_FAKEGEM_BINWRAP
Binaries to wrap around (relative to the bin/ directory) RUBY_FAKEGEM_BINWRAP="*"
RUBY_FAKEGEM_REQUIRE_PATHS
Extra require paths (beside lib) to add to the specification RUBY_FAKEGEM_REQUIRE_PATHS=""
RUBY_FAKEGEM_GEMSPEC
Filename of .gemspec file to install instead of generating a generic one. RUBY_FAKEGEM_GEMSPEC=""
RUBY_FAKEGEM_EXTRAINSTALL
List of files and directories relative to the top directory that also get installed. Some gems provide extra files such as version information, Rails generators, or data that needs to be installed as well. RUBY_FAKEGEM_EXTRAINSTALL=""
 

AUTHORS

Author: Diego E. Pettenò <flameeyes@gentoo.org>
Author: Alex Legler <a3li@gentoo.org>
 

MAINTAINERS

Ruby herd <ruby@gentoo.org>
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/ruby-fakegem.eclass  

SEE ALSO

ebuild(5)
http://sources.gentoo.org/eclass/ruby-fakegem.eclass?view=log


 

Index

NAME
DESCRIPTION
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:12 GMT, April 16, 2014