From: Richard W.M. Jones Date: Fri, 12 Nov 2010 20:25:45 +0000 (+0000) Subject: ruby: Add 'make install' rule for ruby bindings (RHBZ#652796). X-Git-Tag: 1.6.2~25 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=2b7d8e89c4ac5c55ecaa3cbde7fa6e9e452ecd79;p=libguestfs.git ruby: Add 'make install' rule for ruby bindings (RHBZ#652796). (cherry picked from commit aec3091fa9c65e2f84d0bf9cdd520e597957eca9) --- diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 82d130d..cd2d4ed 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -51,4 +51,13 @@ TESTS_ENVIRONMENT = \ all: $(generator_built) rake build +RUBY_SITELIB := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") +RUBY_SITEARCH := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']") + +install: + $(MKDIR_P) $(DESTDIR)$(RUBY_SITELIB) + $(MKDIR_P) $(DESTDIR)$(RUBY_SITEARCH) + $(INSTALL) -p -m 0644 lib/guestfs.rb $(DESTDIR)$(RUBY_SITELIB) + $(INSTALL) -p -m 0755 ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_SITEARCH) + endif