[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/RUBY PATCH 14/16] Makefile.uk: Add rule for creating root filesystem
The Ruby interpreter needs a filesystem where to keep its libraries. This patch creates a root filesystem and installs the Ruby libraries in `/lib/ruby/2.6.0/` directory. For creating the filesystem the following command has to be run: $ make ruby-rootfs path=<directory> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- Makefile.uk | 28 ++++++++++++++++++++++++++++ gems-examples/Gemfile-irb | 8 ++++++++ 2 files changed, 36 insertions(+) create mode 100644 gems-examples/Gemfile-irb diff --git a/Makefile.uk b/Makefile.uk index a7aeb9a..74d8378 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -600,3 +600,31 @@ ifeq ($(CONFIG_LIBRUBY_ENC),y) UK_PREPARE += $(LIBRUBY_BUILD)/.build endif +################################################################################ +# Root filesystem +################################################################################ +# Root filesystem path +RUBY_ROOTFS = $(APP_BASE)/$(path) + +# Configure origin +$(RUBY_ROOTFS)/.configured: $(LIBRUBY_BUILD)/.origin + mkdir -p $(RUBY_ROOTFS) &>/dev/null + cd $(LIBRUBY_SRC) && \ + autoconf && \ + ./configure --prefix=$(shell realpath $(APP_BASE)/$(path)) --with-static-linked-ext && \ + touch $@ && touch $(LIBRUBY_BUILD)/.configured + +# Build Ruby +$(RUBY_ROOTFS)/.build: $(RUBY_ROOTFS)/.configured + cd $(LIBRUBY_SRC) && make && touch $@ && touch $(LIBRUBY_BUILD)/.build + +# Install Ruby +$(RUBY_ROOTFS)/.done: $(RUBY_ROOTFS)/.build + cd $(LIBRUBY_SRC) && make install + cp -r $(LIBRUBY_SRC)/.ext $(RUBY_ROOTFS)/lib/ruby/2.6.0/ + cp -r $(LIBRUBY_SRC)/test $(RUBY_ROOTFS)/lib/ruby/2.6.0/ + cp $(LIBRUBY_BASE)/gems-examples/Gemfile-irb $(RUBY_ROOTFS)/lib/ruby/2.6.0/Gemfile + touch $@ + +.PHONY: ruby-rootfs +ruby-rootfs: $(RUBY_ROOTFS)/.done diff --git a/gems-examples/Gemfile-irb b/gems-examples/Gemfile-irb new file mode 100644 index 0000000..1ac39d0 --- /dev/null +++ b/gems-examples/Gemfile-irb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + +# gem "rails" +gem 'irb', require: false -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |