*******************************************************************************

Libre Media Server - An Open source Media Server.
(c) Santiago Noreña 2012-2013

*******************************************************************************

Developing and support: libremediaserver@gmail.com

Code: http://code.google.com/p/libremediaserver

*******************************************************************************

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*******************************************************************************

If you have troubles, or you are in another distro, you can try compiling from the source code.

0. Requisites
	tcl tk --> To compile Pure Data, not necesary to execute it.
	alsa-dev
	make
	qt4-qmake	
	configure
	gcc
	g++
	libtiff-dev -> ola2jpg

1. Building pd
	$./autogen.sh
	$./configure
	$make

2. Building ola
	$./configure
	$make

3. Building pd externals

	3.1 ola2pd

# Compile and install flext

svn co https://svn.grrrr.org/ext/trunk/flext flext
cd flext
./build.sh pd gcc
Edit the paths in file ./buildsys/cnfg-lnx-gcc.txt 
./build sh pd gcc
sudo ./build.sh pd gcc install
cd ..

# Add enviroment path variables to .bashrc

echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> ~/.bashrc
echo "export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include" >> ~/.bashrc 
echo "export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include" >> ~/.bashrc

# Build and install ola2pd 

cd ola2pd
/path/to/flext/build.sh pd gcc
/path/to/flext/build.sh pd gcc install

	3.2 Gem + pix2jpg

	First we must build ImageMagick:

	$ cd ImageMagick
	$ ./configure
	$ make
	$ sudo make install
		
	Build Gem and pix2jpg:

	
	Make a simbolic link in /usr/local/lib named libMagick++6-Q16.so pointing to libMagick++6.Q16.so.1.0.0
	or rename this file to that name.
    $ cd Gem
	$ ./autogen.sh
	$ ./configure --with-pd=/path/to/pd/source --prefix=$HOME/pd-externals 
	comment the line 65 in the Makefile in /plugins/ImageMagick. It fails compiling.
	$ make
	$ make install	
	$ cd ..
	$ cp $HOME/pd-externals/* ./../bin
	
	3.3 fileselector
	
	$ cd fileselector
	$ make	
	$ cp fileselector.pd_linux ../pd

4. LibreMediaserver

	Open the file libremediaserver.pro with QtCreator and compile it.

	or
	
	$ cd src
	$ qmake-qt4 libremediaserver.pro -r -spec linux-g++
	$ make -w

5. Putting all together.

	.......... 





