diff --git a/README.MacOSX b/README.MacOSX index cf24c08f1f4e88e6cdc31b4e7b33482b824daba9..a53a02fc827730886095a26e015b42340f37cfbf 100644 --- a/README.MacOSX +++ b/README.MacOSX @@ -8,7 +8,13 @@ homebrew as MacPorts. If you want to build at the Homebrew environment execute just: - brew install http://tarantool.org/dist/tarantool.rb + brew install https://raw.githubusercontent.com/tarantool/tarantool/master/extra/tarantool.rb + +Possible flags are: + + --devel - for installing master's branch version + --with-tests - for testing tarantool after building/installing + --with-debug - for building tarantool with -DCMAKE_BUILD_TYPE=Debug Target OS: MacOS X "Lion" @@ -33,7 +39,7 @@ Go to http://developer.apple.com/ to download and install the latest version of "Command Line Tools for Xcode". This package contains /usr/bin/clang and /usr/bin/clang++ binaries. Check that clang version is at least 3.2. -3. Install necessary python modules: pyYAML, daemon +3. Install necessary python modules: pyYAML, python-daemon, pexpect ------------- NB: it is recommended to install python modules through setup.py, using the default python (which should be >= 2.6.x and < 3.x); diff --git a/doc/user/tutorial.xml b/doc/user/tutorial.xml index 445d07c6b1ecc729cb6fc964ebeebe04f83038c5..8bbb44c252c1c5565a7c39deb7754247210614f7 100644 --- a/doc/user/tutorial.xml +++ b/doc/user/tutorial.xml @@ -319,9 +319,9 @@ ones unless you intend to work on the documentation. # (if wget fails, check the <citetitle xlink:href="http://pypi.python.org/pypi/python-daemon" xlink:title="Python daemon">python-daemon</citetitle> web site # to see what the current version is.) <command>cd</command> ~ -<command>wget</command> http://pypi.python.org/packages/source/d/daemon/daemon-1.0.tar.gz -<command>tar</command> <option>-xzvf</option> daemon-1.0.tar.gz -<command>cd</command> daemon-1.0 +<command>wget</command> http://pypi.python.org/packages/source/p/python-daemon/python-daemon-1.5.5.tar.gz +<command>tar</command> <option>-xzvf</option> python-daemon-1.5.5.tar.gz +<command>cd</command> python-daemon-1.5.5 <command>sudo python</command> setup.py install # python module for template engine (jinja2): For documentation: # (If wget fails, check the <citetitle xlink:href="https://pypi.python.org/pypi/Jinja2" xlink:title="Python Jinja2">python-jinja2</citetitle> web site diff --git a/doc/www-data.in/download.cmake b/doc/www-data.in/download.cmake index 8800ce853636c5f6ff5e950565f834e4388f9313..b9dd704dd0b5ce390dece7a682c85a1da1d8ca06 100644 --- a/doc/www-data.in/download.cmake +++ b/doc/www-data.in/download.cmake @@ -134,7 +134,7 @@ download: You can install Tarantool using homebrew: ``` - $ brew install --use-clang http://tarantool.org/dist/stable/tarantool.rb + $ brew install https://raw.githubusercontent.com/tarantool/tarantool/stable/extra/tarantool.rb ``` Please upgrade `clang` to version 3.2 or later using diff --git a/extra/tarantool.rb b/extra/tarantool.rb new file mode 100644 index 0000000000000000000000000000000000000000..cd6a7aa55d1c5bb4f3f9a434f62ca7138555e22c --- /dev/null +++ b/extra/tarantool.rb @@ -0,0 +1,89 @@ +require 'formula' + +class Tarantool < Formula + homepage 'http://tarantool.org' + + depends_on 'cmake' => :build + depends_on "readline" => :build + + option 'with-debug', "Build Debug version" + option 'with-tests', "Run Tests after building" + + stable do + url 'https://github.com/tarantool/tarantool.git', :using => :git, :branch => "stable" + depends_on 'e2fsprogs' => :recommended + if build.include? 'with-tests' + depends_on 'python-daemon' => [:python, "daemon", :build] + depends_on 'pyyaml' => [:python, "yaml", :build] + depends_on 'pexpect' => [:python, "pexpect", :build] + end + version "1.5" + end + + devel do + url 'https://github.com/tarantool/tarantool.git', :using => :git, :branch => "master" + depends_on 'e2fsprogs' => :build + if build.include? 'with-tests' + depends_on 'python-daemon' => [:python, "daemon", :build] + depends_on 'pyyaml' => [:python, "yaml", :build] + end + version "1.6" + end + + def install + args = [] + if build.include? 'with-debug' + ENV.enable_warnings + ENV.deparallelize + args << ["-DCMAKE_BUILD_TYPE=Debug"] + ohai "Building with Debug" + else + args << ["-DCMAKE_BUILD_TYPE=Release"] + ohai "Building with Release" + end + args << "-DENABLE_CLIENT=True" if build.stable? + args += std_cmake_args + + ohai "Preparing" + version = `git -C #{cached_download} describe HEAD` + File.open("#{buildpath}/VERSION", 'w') {|file| file.write(version)} + + ohai "Configuring:" + system "cmake", ".", *args + + ohai "Building:" + system "make" + + ohai "Installing:" + system "make install" + + ohai "Installing man" + man1.install 'doc/man/tarantool.1' + if build.stable? + man1.install 'doc/man/tarantool_box.1' + end + + ohai "Installing config" + if build.stable? + inreplace etc/"tarantool.cfg", /^work_dir =.*/, "work_dir = #{prefix}/var/lib/tarantool" + else + doc.install "test/box/box.lua" + inreplace doc/"box.lua" do |s| + s.gsub!(/^os = require.*\n/ , '') + s.gsub!(/(primary_port\s*=).*/, '\1 3301,') + s.gsub!(/(admin_port\s*=).*/ , '\1 3313,') + s.gsub!(/(rows_per_wal.*)/ , '\1,') + s.gsub!(/^}.*/ , "\twork_dir\t\t\t= \"#{prefix}/var/lib/tarantool\",\n}") + end + end + + if build.include? 'with-tests' + ohai "Testing Tarantool with internal test suite:" + system "/usr/bin/env", "python", "#{buildpath}/test/test-run.py", "--builddir", "#{buildpath}", "--vardir", "#{buildpath}/test/var" + end + end + + def test + system "#{bin}/tarantool", "--version" + end +end