diff --git a/README.rst b/README.rst index ec791d4d5896cf5f984b782f5156f90b153fadbe..4a78b32c4d66801a1d28590b8a09ecabe22336c6 100644 --- a/README.rst +++ b/README.rst @@ -42,40 +42,85 @@ machines. Building -------- -Dependencies: +Base dependencies: -- portaudio -- leveldb -- libtool -- fftw -- pcre +- Go (at least version 1.2) +- LevelDB -To build djrandom on GNU/Linux:: +Note that the LevelDB version in Debian wheezy is too old with +respect to the Go bindings, so you might need to compile it from +source. - $ mkdir -p $GOPATH/src/git.autistici.org/ale - $ cd $GOPATH/src/git.autistici.org/ale - $ git clone https://git.autistici.org/ale/imms.git imms - $ cd imms - $ aclocal ; libtoolize ; automake --foreign --add-missing ; autoconf - $ ./configure && make && sudo make install - $ go get -d git.autistici.org/ale/djrandom - $ cd $GOPATH/src/git.autistici.org/ale/djrandom - $ go get -v ./... - $ ./mkclientdist.sh +You'll need to check out the source repository at the right place +in your ``GOPATH``:: -To build only the client you can run the following command instead of -``go get -v ./...``:: + $ go get -d git.autistici.org/ale/djrandom - $ go get -v ./client/... +Once this is done, choose whether you want to build the full suite +or just the clients (which have a much smaller set of dependencies). -To build djrandom on OS X you can install all the dependencies with -`homebrew`:: - $ brew install portaudio leveldb libtool fftw pcre +Building the clients +~~~~~~~~~~~~~~~~~~~~ -You also have to use ``glibtoolize`` instead of ``libtoolize``:: +The DJRandom client suite need the PortAudio library (version 1.9 +or higher) to talk to the audio device, and either ``ffmpeg`` or +the ``libav`` suite (``avconv``). + +On a Debian-based system, ``apt-get install libav-tools portaudio19-dev`` +should do. + +* install the Go package dependencies: + + $ go get git.autistici.org/ale/djrandom/client/... + +* install the client binaries:: + + $ go install git.autistici.org/ale/djrandom/client/... + +You should now have ``djplay``, ``djupload`` and ``djmpd`` in ``$GOPATH/bin``. + + +Building the service +~~~~~~~~~~~~~~~~~~~~ + +Server-side components have quite a few dependencies on third-party +libraries, including one that is not packaged in distributions +and has to be built manually (imms): + +- a basic C/C++ build environment +- GNU autotools +- GNU libtool +- FFTW (v3) +- PCRE +- IMMS (see below) + +On a Debian system, install the required packages with:: + + $ apt-get install build-essential autoconf automake libtool \ + pkg-config libfftw3-dev libpcre3-dev + +On OSX, using ``brew``:: + + $ brew install portaudio leveldb libtool fftw pcre + +To build IMMS:: + + $ go get -d git.autistici.org/ale/imms + $ cd $GOPATH/src/git.autistici.org/ale/imms + $ aclocal ; libtoolize ; automake --foreign --add-missing ; autoconf + $ ./configure && make && sudo make install + +(on OSX, you might have to use ``glibtoolize`` instead of ``libtoolize``). + +You should now be able to build all the server-side tools with:: + + $ cd $GOPATH/src/git.autistici.org/ale/djrandom + $ go get -v ./server/... + $ go install -v ./server/... + $ go get -v ./mapreduce/... + $ go install -v ./mapreduce/... - $ aclocal ; glibtoolize ; automake --foreign --add-missing ; autoconf Running the upload client -------------------------