diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-03 00:56:16 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-03 18:00:28 +0900 |
commit | e5f019420fcfce17d881e38aa87afc8d6329f066 (patch) | |
tree | 659bbca26c6c6c536b8be94f8c100137a17906b3 | |
parent | 75b35291aee5abe9fd6b5e7bd6d030c8f352202c (diff) | |
download | poe-e5f019420fcfce17d881e38aa87afc8d6329f066.tar.gz |
rakefile: PHP のコンパイルを直した
-rw-r--r-- | Rakefile | 22 | ||||
-rw-r--r-- | config.json | 126 |
2 files changed, 40 insertions, 108 deletions
@@ -116,7 +116,7 @@ namespace :compiler do } add_compiler("ruby", id, { - version: `LD_LIBRARY_PATH=#{destdir}#{prefix}/lib #{destdir}#{prefix}/bin/ruby -v`.lines.first.chomp, + version: `LD_LIBRARY_PATH=#{destdir}#{prefix}/lib #{destdir}#{prefix}/bin/ruby -v`, version_command: "#{prefix}/bin/ruby -v", commandline: ["#{prefix}/bin/ruby", "{}"] }) @@ -125,16 +125,12 @@ namespace :compiler do } end - PHPS = { - "7.0.3" => "http://jp2.php.net/distributions/php-7.0.3.tar.gz", - "5.6.17" => "http://jp2.php.net/distributions/php-5.6.17.tar.gz", - } + PHP_MIRROR = "http://jp2.php.net/distributions" desc "Install a php" task :php, [:version] do |t, args| version = args[:version] - id = "ruby-#{version}" - url = PHPS[version] or raise(ArgumentError, "unknown php") - name = url.split("/").last + id = "php-#{version}" + url = "#{PHP_MIRROR}/#{id}.tar.gz" destdir = $datadir + "/env/php/#{id}" raise ArgumentError, "already installed?" if Dir.exist?(destdir.to_s) @@ -142,17 +138,17 @@ namespace :compiler do Dir.mktmpdir { |tmpdir| FileUtils.chdir(tmpdir) { - system("curl -O #{Shellwords.escape(url)}") or raise("failed to download") - system("tar xf #{Shellwords.escape(name)}") or raise("failed to extract") - FileUtils.chdir(name.split(".tar.gz").first) { + download(url, "archive.tar.gz") + system("tar xf archive.tar.gz") or raise("failed to extract") + FileUtils.chdir(id) { retriable { system("./configure --prefix=#{prefix} --enable-shared") or raise("failed to configure") system("make -j6") or raise("failed to make") - system("make install INSTALL_ROOT=#{destdir.to_s}") or raise("failed to install") + system("make install INSTALL_ROOT=#{destdir}") or raise("failed to install") } add_compiler("php", id, { - version: `LD_LIBRARY_PATH=#{destdir}#{prefix}/lib #{destdir}#{prefix}/bin/php -v`.lines.first.chomp, + version: `LD_LIBRARY_PATH=#{destdir}#{prefix}/lib #{destdir}#{prefix}/bin/php -v`, version_command: "#{prefix}/bin/php -v", commandline: ["#{prefix}/bin/php", "{}"] }) diff --git a/config.json b/config.json index af7ad18..01af04d 100644 --- a/config.json +++ b/config.json @@ -3,160 +3,96 @@ "runner": "/work/poe/sandbox/runner", "compilers": { "ruby": { - "ruby-2.3.0": { - "version": "ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-2.2.4": { - "version": "ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-2.1.10": { - "version": "ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-2.0.0-p648": { - "version": "ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-2.0.0-p0": { - "version": "ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-1.9.3-p0": { - "version": "ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-1.9.2-p0": { - "version": "ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-1.9.1-p0": { - "version": "ruby 1.9.1p0 (2009-01-30 revision 21907) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", - "commandline": [ - "/usr/bin/ruby", - "{}" - ] - }, - "ruby-1.9.0-0": { - "version": "ruby 1.9.0 (2007-12-25 revision 14709) [x86_64-linux]", + "ruby-2.3.1": { + "version": "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.7": { - "version": "ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]", + "ruby-2.3.0": { + "version": "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.6": { - "version": "ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]", + "ruby-2.2.5": { + "version": "ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.5": { - "version": "ruby 1.8.5 (2006-08-25) [x86_64-linux]", + "ruby-2.1.10": { + "version": "ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.4": { - "version": "ruby 1.8.4 (2005-12-24) [x86_64-linux]", + "ruby-2.0.0-p648": { + "version": "ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.3": { - "version": "ruby 1.8.3 (2005-09-21) [x86_64-linux]", + "ruby-1.8.7-p374": { + "version": "ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.2": { - "version": "ruby 1.8.2 (2004-12-25) [x86_64-linux]", + "ruby-1.8.6-p420": { + "version": "ruby 1.8.6 (2010-09-02 patchlevel 420) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] }, - "ruby-1.8.1": { - "version": "ruby 1.8.1 (2003-12-25) [x86_64-linux]", + "ruby-1.6.8": { + "version": "ruby 1.6.8 (2002-12-24) [x86_64-linux]\n", "version_command": "/usr/bin/ruby -v", "commandline": [ "/usr/bin/ruby", "{}" ] - }, - "ruby-1.8.0": { - "version": "ruby 1.8.0 (2003-08-04) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", + } + }, + "php": { + "php-7.0.6": { + "version": "PHP 7.0.6 (cli) (built: Jan 1 1970 00:00:00) ( NTS )\nCopyright (c) 1997-2016 The PHP Group\nZend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies\n", + "version_command": "/usr/bin/php -v", "commandline": [ - "/usr/bin/ruby", + "/usr/bin/php", "{}" ] }, - "ruby-1.6.8": { - "version": "ruby 1.6.8 (2002-12-24) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", + "php-5.6.21": { + "version": "PHP 5.6.21 (cli) (built: Jan 1 1970 00:00:00) \nCopyright (c) 1997-2016 The PHP Group\nZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies\n", + "version_command": "/usr/bin/php -v", "commandline": [ - "/usr/bin/ruby", + "/usr/bin/php", "{}" ] }, - "ruby-1.6.5": { - "version": "ruby 1.6.5 (2001-09-19) [x86_64-linux]", - "version_command": "/usr/bin/ruby -v", + "php-5.5.35": { + "version": "PHP 5.5.35 (cli) (built: Jan 1 1970 00:00:00) \nCopyright (c) 1997-2015 The PHP Group\nZend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies\n", + "version_command": "/usr/bin/php -v", "commandline": [ - "/usr/bin/ruby", + "/usr/bin/php", "{}" ] } - }, - "php": { } } } |