[Groonga-commit] groonga/heroku-groonga-builder at 82598a6 [master] Try to build LZ4

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Feb 11 13:13:07 JST 2015


Kouhei Sutou	2015-02-11 13:13:07 +0900 (Wed, 11 Feb 2015)

  New Revision: 82598a6959092db00dd0b245e78941790e5e12ac
  https://github.com/groonga/heroku-groonga-builder/commit/82598a6959092db00dd0b245e78941790e5e12ac

  Message:
    Try to build LZ4

  Modified files:
    Rakefile

  Modified: Rakefile (+26 -0)
===================================================================
--- Rakefile    2015-02-11 13:00:30 +0900 (1d45313)
+++ Rakefile    2015-02-11 13:13:07 +0900 (88f9c0d)
@@ -15,8 +15,10 @@ class GroongaBuilder
 
   def run
     ensure_release
+    setup_environment_variables
     build_mecab
     build_msgpack
+    build_lz4
     build_groonga
     archive_name = archive
     upload_archive(archive_name)
@@ -80,6 +82,14 @@ class GroongaBuilder
     client.create_release(github_groonga_repository, groonga_tag_name)
   end
 
+  def setup_environment_variables
+    ENV["PKG_CONFIG_PATH"] =
+      File.join(absolute_install_prefix, "lib", "pkg-config")
+    path = ENV["PATH"]
+    path += [File.join(absolute_install_prefix, "bin")]
+    ENV["PATH"] = path.join(File::PATH_SEPARATOR)
+  end
+
   def build_mecab
     mecab_version = "0.996"
     mecab_archive_name = "mecab-#{mecab_version}"
@@ -147,6 +157,21 @@ class GroongaBuilder
     end
   end
 
+  def build_lz4
+    lz4_version = "r127"
+    lz4_archive_name = "lz4-#{lz4_version}"
+    sh("curl",
+       "--silent",
+       "--remote-name",
+       "--location",
+       "--fail",
+       "https://github.com/Cyan4973/lz4/archive/#{lz4_archive_name}.tar.gz")
+    sh("tar", "xf", "#{lz4_archive_name}.tar.gz")
+
+    Dir.chdir(lz4_archive_name) do
+      sh("make", "install", "PREFIX=#{absolute_install_prefix}")
+    end
+  end
   def build_groonga
     archive_name = "#{groonga_base_name}.tar.gz"
     sh("curl",
@@ -167,6 +192,7 @@ class GroongaBuilder
          "--disable-static",
          "--disable-document",
          "--with-message-pack=#{absolute_install_prefix}",
+         "--with-lz4",
          *configure_args)
       sh("make", "-j4")
       sh("make", "install")
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index