How to compile Tupi source code (Fedora)

Ok, it's a fact. The source code compilation of Tupi from Fedora 14 or 15 is not a myth, not anymore! :P

Let's take a look to the whole process.

First, you have to prepare your environment to the compilation process. From a clean installation of the system, I had to run these commands as root:

% yum install gcc.i686
% yum install gcc-c++
% yum install yasm.i686
% yum install qt.i686
% yum install qt-devel.i686
% yum install ruby.i686
% yum install aspell-devel.i686
% yum install git.i686

Second,

a) If you are using Fedora 14

You'll need some packages which are not included in the default Yum repositories. So, it's necessary to add one more to your Yum config file.

Looking around the Internet, I found this handy place full of RPM packages: http://packages.atrpms.net/dist/f14/

The instructions about how to add this repository in your system are here: http://atrpms.net/documentation/install/

The brief version is this:

1. As root, type this:
% rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms

2. Then, add the following lines at the end of the
config file /etc/yum.conf in your system:

[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

After this, you have to install the last dependency required by Tupi. As root, type:

% yum install ffmpeg-devel.i686

b) If you are using Fedora 15

As root, type:

% yum install ffmpeg ffmpeg-libs ffmpeg-dev

% ln -s /usr/include/ffmpeg/libavcodec /usr/include% /libavcodec
% ln -s /usr/include/ffmpeg/libavformat /usr/include/libavformat
% ln -s /usr/include/ffmpeg/libavutil /usr/include/libavutil

Now, set the variable PATH including the Qt binaries path:

% export PATH=/usr/lib/qt4/bin:$PATH

Third, it's time to get the Tupi's source code and compile it. From your user directory, run these commands:

% git clone git://github.com/xtingray/tupi.git
% cd tupi
% ./configure --prefix=/usr/local/tupi
Note: You can choose another path to install Tupi if you want.
% make

If everything goes well, as root, type this command from the same path you did the compilation:
% make install

There's a SELinux issue in Fedora, so I had to run this command additionally as root to get Tupi running:

% chcon -t execmem_exec_t '/usr/local/tupi/bin/tupi.bin'

And that's all! We got Tupi running from Fedora! :D