I have been wanting to upgrade to the 0.21 development branch to get the benefit of Storage Groups. The current Myth box is an Asus Pundit, which works really well, but has only got space for one hard drive. Ideally I would like my Myth storage on a mirrored pair of drives. I do have another server, which has mirrored drives and since the whole house is wired up with CAT6 cable and Gigabit hubs, it would make sense for me to store at least some of my Myth recordings on it.
I can define the mirrored drives on my server as a Storage Group in MythTV. Now I can store any recordings which I wouldn’t be too bothered about losing, e.g. Coronation St, on the local drive and the important stuff (Dr Who) on the mirrored drives.
I am assuming that you already have subversion and build-essential installed on your MythTV box.
Install Dependencies Required to Compile MythTV.
Luckily Ubuntu makes this easy:
apt-get build-dep mythtv mythplugins myththemes
Note that Myth also require a whole raft of other stuff like MySQL. One easy way to make sure you have all this installed is to install the pre-built MythTV packages using Synaptic and then uninstall them. This will remove the MythTV packages, but not the other things you need like MySQL.
Check Out the MythTV Code from the Repository.
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
Note that this will check out the current bleeding edge code, which may serious contain bugs. Use at your own risk.
Building the Code.
First you need to configure and build mythtv. Change to the directory where you checked out mythtv:
cd ~/devel/myth-svn/mythtv
You don’t want to splatter bits of myth all over your system, so I suggest that you install it in usr/local, where you can easily remove all traces if needed. You can see all the options available by running ./configure —help. However, in my case I just needed to run:
./configure --prefix=/usr/local
provided configure completes with no errors, you can simply run make. For some reason the last line of configure failed to run on my system, so I needed to run
qmake mythtv.pro
Then I just ran:
make
Now go and have a cup of tea, as compiling takes quite some time. Once everything has compiled without errors the documents suggest that you run:
make install
However, on Ubuntu and other Debian based systems you can use checkinstall. If it’s not installed on your system just apt-get checkinstall. This will build and install a Debian package file for you. Should you wish to uninstall the package, you can do it via all the usual ways, such as using Synaptic. You don’t need to worry about the install process scattering files all over your system. So you simply type:
checkinstall
You will need enter a description for the package e.g. MythTV svn and a version number e.g. 0.21-svn. Note if you don’t enter a version number checkinstall will fail. Assuming this all went smoothly, you can now proceed to building the plugins.
Building and Installing MythTV Plugins.
Change to the directory where you downloaded the plugins and run ./configure. Again you can get help by running ./configure —help. If you don’t want to install a particular plugin e.g. mythphone, you can disable the plugin during configure using the —disable-plugin option:
./configure --disable-mythphone --disable-mythweather
Once configure has completed you need to run:
qmake mythplugins.pro make
Finally you can install the plugins using checkinstall in the same way as the main MythTV package.
You should now be ready to go. If you had previously installed and configured the standard MythTV packages in Feisty, everything should now “Just work.”
Problems Compiling.
Ubuntu may complain about missing libraries. By default Ubuntu doesn’t look for libraries in /usr/local/lib. To fix this problem:
sudo vim /etc/ld.so.conf
Append /usr/local/lib to the end of the file and run:
sudo ldconfig
If you are upgrading and already have /usr/local/lib at the end of the file simply running ldconfig again often fixes the problem.
Installing MythWeb.
Copy the file somewhere under the root directory of your web server root:
cp -a /home/devel/mythplugins/mythweb /var/www/
Edit the mythweb.conf file and make any necessary alterations. You will also need to include this file somewhere in Apache’s config files. I put mine in /etc/apache2/apache2.conf:
# Include the virtual host configurations: Include /etc/apache2/sites-enabled/ Include /var/www/mythweb/mythweb.conf
Don’t forget to restart Apache, or it won’t work!
/etc/init.d/apache2 restart
