[Libguestfs] [PATCH] hivex: ruby: Support 'make INSTALLDIRS=vendor install' for Ruby
Richard W.M. Jones
rjones at redhat.com
Thu Jan 16 20:07:54 UTC 2014
On Thu, Jan 16, 2014 at 08:29:04PM +0100, Hilko Bengen wrote:
> (This is the same change as 87c9ec881cb695724e01d9f6fc9df996d4c67cb6
> in libguestfs.)
> ---
> ruby/Makefile.am | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/ruby/Makefile.am b/ruby/Makefile.am
> index e78ab59..7a5fe42 100644
> --- a/ruby/Makefile.am
> +++ b/ruby/Makefile.am
> @@ -45,13 +45,17 @@ all:
> $(RAKE) build
> $(RAKE) rdoc
>
> -RUBY_SITELIB := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
> -RUBY_SITEARCH := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitearchdir']")
> +# Packagers can override this by doing: make INSTALLDIRS=vendor install
> +# INSTALLDIRS also affects where Perl bindings are installed.
> +INSTALLDIRS = site
> +
> +RUBY_LIBDIR := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['$(INSTALLDIRS)libdir']")
> +RUBY_ARCHDIR := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['$(INSTALLDIRS)archdir']")
>
> install:
> - $(MKDIR_P) $(DESTDIR)$(RUBY_SITELIB)
> - $(MKDIR_P) $(DESTDIR)$(RUBY_SITEARCH)
> - $(INSTALL) -p -m 0644 ${srcdir}/lib/hivex.rb $(DESTDIR)$(RUBY_SITELIB)
> - $(INSTALL) -p -m 0755 ${builddir}/ext/hivex/_hivex.so $(DESTDIR)$(RUBY_SITEARCH)
> + $(MKDIR_P) $(DESTDIR)$(RUBY_LIBDIR)
> + $(MKDIR_P) $(DESTDIR)$(RUBY_ARCHDIR)
> + $(INSTALL) -p -m 0644 $(srcdir)/lib/hivex.rb $(DESTDIR)$(RUBY_LIBDIR)
> + $(INSTALL) -p -m 0755 $(builddir)/ext/hivex/_hivex.so $(DESTDIR)$(RUBY_ARCHDIR)
>
> endif
> --
> 1.8.5.2
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list