From 99becc55bd051c6a267168f0ff15bb9414bfab05 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 25 Nov 2014 17:54:17 +0100 Subject: [PATCH] New build_style: ruby-module - for install.rb ruby modules. --- Manual.md | 3 +++ common/build_style/ruby-module.sh | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 common/build_style/ruby-module.sh diff --git a/Manual.md b/Manual.md index 1327502d033..a29d16e9b5d 100644 --- a/Manual.md +++ b/Manual.md @@ -513,6 +513,9 @@ depend on additional packages. This build style does not install dependencies to the root directory, and only checks if a binary package is available in repositories. +- `ruby-module` For packages that are ruby modules and are installable via `ruby install.rb`. +Additional install arguments can be specified via `make_install_args`. + - `perl-ModuleBuild` For packages that use the Perl [Module::Build](http://search.cpan.org/~leont/Module-Build-0.4202/lib/Module/Build.pm) method. diff --git a/common/build_style/ruby-module.sh b/common/build_style/ruby-module.sh new file mode 100644 index 00000000000..b4fe9c3bca6 --- /dev/null +++ b/common/build_style/ruby-module.sh @@ -0,0 +1,9 @@ +# +# This helper is for templates installing ruby modules. +# + +do_install() { + local _vendorlibdir=$(ruby -e 'puts RbConfig::CONFIG["vendorlibdir"]') + + ruby install.rb --destdir=${DESTDIR} --sitelibdir=${_vendorlibdir} ${make_install_args} +}