Skip to content
piroor edited this page Nov 14, 2012 · 6 revisions

For GCS developers

Setup

  1. Install groonga. There is the installation guide (Japanese). For example, installation of the master to the user's home directory (on Debian Squeeze):
    % sudo aptitude -V -D -y install wget tar build-essential zlib1g-dev liblzo2-dev libmsgpack-dev libzmq-dev libevent-dev libmecab-dev
    % cd /tmp
    % git clone git://github.com/groonga/groonga.git
    % cd groonga
    % ./automake.sh
    % ./configure --prefix=$HOME/local
    % make
    
  2. Install the latest release of the Node.js.
    1. Install nvm (and npm).
      % sudo aptitude install build-essential libssl-dev curl
      % git clone git://github.com/creationix/nvm.git ~/.nvm
      % source ~/.nvm/nvm.sh
      
    2. Install Node.js.
      % nvm install v0.6.18
      % nvm use v0.6.18
      
  3. Clone the repository. (For example, cloning to ~/gcs )
    % cd ~/
    % git clone [email protected]:groonga/gcs.git
    
  4. Install depending modules.
    1. Install pkg-config.
    2. Install other depending modules.
      % cd ~/gcs
      % npm install
      
      If you've installed groonga into your home directory, you must specify PKG_CONFIG_PATH like:
      % cd ~/gcs
      % env PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig npm install
      
      And, you have to set LD_LIBRARY_PATH to use plugins in your groonga. For example, add following lines to your "~/.bash_profile" and run "source ~/.bash_profile".
      LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/local/lib
      export  LD_LIBRARY_PATH
      
  5. Create the base directory.
    % mkdir /tmp/gcs
    
  6. Have a fun!
    % cd ~/gcs
    % rpm start
    

How to run automated tests

% npm test

Before you run the test, you should mount tmpfs to the temporary directory for tests.

% mkdir -p ./test/tmp
% sudo mount -t tmpfs tmpfs ./test/tmp

How to build .deb packages

For example, to build .deb package for Ubuntu 12.04 (AMD64):

% cd packages/apt
% make build CODES=precise ARCHITECTURES=amd64

Then, .deb packages are generated to the location: repositories/ubuntu/pool/precise/universe/g/gcs