Installing MythTV SVN on Fedora

From MythTV Official Wiki
Revision as of 01:48, 5 March 2006 by Gregturn (talk | contribs) (Headers start at level 2 (MythTV:Manual of Style))

Jump to: navigation, search

This guide is to help users of Fedora Core to compile MythTV using the Subversion (SVN) source code, to take advantage of the latest (bleeding edge) patches to MythTV.

Overview

This overview assumes you already have MythTV running via the guide at http://wilsonet.com/mythtv/

This guide was developed with MythTV 0.19.1 and Fedora Core 4 in mind. Additions are welcome by users of other Fedora Core versions.

This guide was also built with the help of another wiki page Upgrading To SVN

Install prerequisites

Repositories

You will need the atrpms and freshrpms repositories to be installed. See http://wilsonet.com/mythtv/fcmyth.php#xtrarepos for details on how to do this.

Setup a user called mythtv, and login to it

If you have not done so already, create a separate user called mythtv

# adduser mythtv
# passwd mythtv

Remove packages

We need to remove the MythTV packages installed when we followed the MythTV HOWTO. However, this keeps all of the libraries that we need to compile MythTV later.

# rpm -qa | grep myth | xargs rpm -e

Install packages

There are a number of development libraries and packages required to compile MythTV. The following commands should obtain them all.

# yum install lirc-lib-devel lame-devel qt-devel subversion libmyth

Run the following to get the myth plugin dependencies

# yum install fftw2 fftw2-devel libid3tag libid3tag-devel libmad-devel flac-devel libcdaudio-devel SDL-devel cdparanoia-devel libexif-devel fftw3 fftw3-devel

If you get the following error message during the myth plugin dependencies installation:

Error: Missing Dependency: libid3tag = 0.15.0b is needed by package libid3tag-devel

this means that you have a library installed that is greater than the development library available (in this case libid3tag-devel is v0.15.0b but libid3tag 0.15.1-3.b is installed). To resolve this do:

# yum remove libd3tag

then run the above yum install and it should resolve the dependencies correctly.

Install MythTV source code

Now login as the mythtv user you created above.

Here we use subversion to obtain the latest source code.

 $ svn co http://svn.mythtv.org/svn/trunk/mythtv
 $ svn co http://svn.mythtv.org/svn/trunk/mythplugins
 $ svn co http://svn.mythtv.org/svn/trunk/myththemes

Compile the source code

Compile MythTV

Configure the destination of the package

The first step is to point MythTV to install at /usr/local instead of /usr just in case we already have various MythTV packages installed from using the MythTV Fedora HOWTO previously.

$ cd mythtv
$ ./configure --prefix=/usr/local

Note: there are a lot of additional command line options for the configure phase. Here's the full command line I used:

$ ./configure --prefix=/usr/local --enable-xvmc --arch=i686 --enable-proc-opt --enable-dvb 

To check them all out use ./configure --help

$ qmake PREFIX=/usr/local mythtv.pro

Start the MythTV compile

$ make

Now install mythtv (you should still be logged in as root to do this):

# su
# make install

Now we'll ensure that the mythbackend will start automatically when the PC reboots:

# cd contrib
# cp etc.rc.d.init.d.mythbackend /etc/rc.d/init.d/mythbackend
# chmod a+x /etc/rc.d/init.d/mythbackend
# cp etc.sysconfig.mythbackend /etc/sysconfig/mythbackend
# /sbin/chkconfig --level 345 mythbackend on
# echo "/usr/local/lib" >> /etc/ld.so.conf
# /sbin/ldconfig
# exit

Start the MythPlugins compile

$ cd ../mythplugins
$ ./configure
$ qmake mythplugins.pro
$ make

If you receive an error message of something like -lrfftw not found during the compile, you may need to do the following

$ su
# cd /usr/lib
# ln -s librfftw.so.2.0.7 librfftw.so
# ln -s libfftw.so.2.0.7 libfftw.so
# exit

then just do a make as before

After the make has completed successfully you need to install the plugins:

$ su
# make install

The web-based interface to MythTV (mythtweb) also needs to be installed:

# cd mythweb
# mkdir /var/www/html/mythweb
# cp -R * /var/www/html/mythweb

Configuration

You are now ready to configure your MythTV system

$ su -
# mythtv-setup
# service mythbackend start

Applying SVN upgrades

One of the advantages of running SVN is that you can odwnload the latest revision of MythTV. There are usually 5 or more updates a day to the MythTV source code. These guides let you know

What has changed since I last compiled MythTV?

You should subscribe to the mythtv-commits mailing list. FIXME: Details on where to subscribe.

make clean / make distclean

Sometimes when there is an update, there will be a comment in there which says "make clean" or "make distclean". If you need to perform a make distclean, you will lose all of your previous ./configure parameters. It is recommended you keep your own compile parameters in a separate .sh file so you can easily rebuild if you need to perform a make distclean.

Here's a couple of scripts I use to make life easier:

--- doconfig.sh ---
cd mythtv
make distclean
./configure --prefix=/usr/local --enable-xvmc --arch=i686 --enable-proc-opt --enable-dvb
qmake PREFIX=/usr/ocal mythtv.pro
cd ../mythplugins
make distclean
./configure
qmake mythplugins.pro
--- domake.sh ---
cd mythtv
make -j 2
cd ../mythplugins
make -j 2

Updating your source code

Use the same svn commands as shown above to checkout the source trees. SVN is smart enough to download only the files that have been updated.