How to create a debian package for Riak on Wheezy

Riak is a distributed database that we use in a project of ours. The project is being migrated from a difficult setup on Debian Squeeze to a easier one on Debian Wheezy; unfortunately, while an official Debian package for squeeze is available, one for Wheezy is not. None of the ubuntu packages works on Wheezy either, due to dependencies.

I have searched a lot to see if there was a way to create a Debian package for Riak 1.3.0 on Wheezy. I found a few references, but not a complete one. I finally succeeded in creating the package, and I am writing a four step guide here.

Step 1: install an handful of prerequisites:
As root (or via sudo, if it's already installed) run:

apt-get install libc6-dev build-essential debhelper git sudo devscripts erlang-nox erlang-reltool erlang-dev

Step 2: clone the git repository and checkout 1.3:

cd /usr/local/src
git clone git://github.com/basho/riak.git
cd riak
git checkout 1.3

Step 3: compile

make package RELEASE=1

Step 4: fetch the package
You'll find the package in package/packages. Now you can install it using dpkg.

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s