How To Compile Amarok 2 From SVN On K/X/Ubuntu
How To Compile Amarok 2 From SVN On K/X/UbuntuAuthor: Stephan Jau Revision: v1.1 Last Change: April 13 2009 IntroductionAmarok is a pretty nifty, versatile and advanced music player for the KDE desktop. However the current version in the *buntu 8.10 repos is hopelessly outdated and (IMHO) totally bugged. There's also the Amarok Neon Project, which aims at providing daily SVN builds for *buntu however lately they have not been updated. So, if you want to be up-to-date with latest Amarok development you either wait until the Neon Project provides binaries again or you compile it on your own. If you want to compile it on your own, you require KDE 4.2. There are also PPA repos for that, use my generator http://repogen.simplylinux.ch to get the according info. The following howto will feature a few more things than are necessary. I like especially to add the medibuntu repos so that together with kubuntu-restricted-extras I have codecs for just about everyting. The package I install from medibuntu in this howto is the w32codecs (or w64codecs if you are on a 64bit OS). I tested this howto on a vanilla Kubuntu 8.10 install. Depending on how you modified your system over time you will need to adjust a few things. Thanks goes to markey and mamarok in the #amarok channel in irc.freenode.org. Also the groundwork for this howto are the following two pages:
Jaunty UsersFor Jaunty users there are three minor differences that need to be regarded. I have listed them below: Step 1: The "amarok-engine-xine" packages is not installed by default on Jaunty. So it must not/can't be purged. I tested this on a vanilla Kubuntu Jaunty 9.04 Beta install in VmWare Workstation 6.5 and I did log the whole installation process. You can also download the log from here. The extracted log file is 2.5 MB in size and contains over 30,000 lines.
Step 1: Remove current amarok installationsudo apt-get purge amarok amarok-common amarok-engine-xine Instead of "purge" you can also use "remove". The difference is that purge will delete config and user data files (e.g. your statistics and stuff) - you may want to make a backup first.
Step 2: Update your sources.listYou can use my repo generator: http://repogen.simplylinux.ch. It's important that you select the "main, restricted, universe, multiverse" branches, the "security, updates, proposed, backports" updates and the "KDE 4.2 PPA, Medibuntu" 3rd party repos. Medibuntu isn't required but it's recommended. That should generate a list like this: ############################################################# ################### OFFICIAL UBUNTU REPOS ################### ############################################################# ###### Ubuntu Main Repos deb http://ch.archive.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse ###### Ubuntu Update Repos deb http://ch.archive.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse deb http://ch.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse deb http://ch.archive.ubuntu.com/ubuntu/ intrepid-proposed main restricted universe multiverse deb http://ch.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse ###### Ubuntu Partner Repo deb http://archive.canonical.com/ubuntu intrepid partner ############################################################## ##################### UNOFFICIAL REPOS ###################### ############################################################## ###### 3rd Party Binary Repos #### KDE 4.2 PPA Repos - http://www.kubuntu.org/news/kde-4.2 ## Run this command: gpg --keyserver keyserver.ubuntu.com --recv-keys 493B3065 && gpg --export -a 493B3065 | sudo apt-key add - deb http://ppa.launchpad.net/kubuntu-experimental/ubuntu intrepid main #### Medibuntu - http://www.medibuntu.org/ ## Run this command: sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update deb http://packages.medibuntu.org/ intrepid free non-free Replace your /etc/apt/sources.list with this list above (or your own) or add the missing parts to it. Finally you just need to import that gpg keys to get rid of the error message that would appear otherwise:
gpg --keyserver keyserver.ubuntu.com --recv-keys 493B3065 && gpg --export -a 493B3065 | sudo apt-key add -
Step 3: UpgradeAfter you added the KDE 4.2 repos you need to upgrade your system: sudo apt-get dist-upgrade And then remove the obsolete dependencies (not necessary but recommended): sudo apt-get autoremove
Step 4: RebootReboot your system: sudo reboot
Step 5: Install the required packagesNow install the required packages. If you're on 64-bit then use the w64codecs package instead of the w32codecs one: sudo apt-get install kubuntu-restricted-extras w32codecs build-essential kde-devel subversion libmysqlclient15-dev libncurses5-dev libtag1-dev libstrigiqtdbusclient-dev
Step 6: Extend your .bashrc and myenv.shYou need to extend your .bashrc and myenv.sh files with a few things. Just run those commands: KDE Users use this:
echo '' >> ${HOME}/.bashrc Non-KDE Users use this:
echo '' >> ${HOME}/.bashrc And verify whether those were really added:
cat ${HOME}/.bashrc If you're a non-KDE user, then only issue the first of those two commands
Step 7: Reload your .bashrcReload your .bashrc: source ${HOME}/.bashrc
Step 8: Created required foldersCreate the required folders:
mkdir -p ${HOME}/kde/src
Step 9: Download amarok and taglib-extras by svnDownload Amarok and taglib-extras by issuing these commands:
cd ${HOME}/kde/src At the time I did this I checked out revision 942886.
Step 10: Download MySQLMySQL is now integrated in Amarok 2 directly, this means we require the source for it. You can download MySQL here http://dev.mysql.com/downloads/mysql/5.1.html#source (select the tar.gz version). The current version is 5.1.32 and for the next commands to be correct you need to change the version number accordingly if you use a newer one. If you opt to manually download MySQL then download it to: ${HOME}/kde/src Or you can just follow those commands below to get the MySQL source into the proper place:
cd ${HOME}/kde/src
Step 11: Extract and compile MySQLAs said before, if you use a different version, you need to alter the version number in the following steps:
tar xzvf mysql-5.1.32.tar.gz In case you got a multicore cpu or more cpus then you can change the number of cores to be used to compile. If you have a dual core then set the option below to "-j3". If you have a quadcore set it to "-j5". In rare cases there are problems by using multicore; if that's the case then just set it to "-j1": export MAKEOPTS=-j2 Now you can compile MySQL: ./build-mysqle.sh --prefix=${HOME}/usr
Step 12: compile taglib-extrasThis has lately been moved out of the amarok svn and needs to be compiled on its own. Run the following steps:
cd ${HOME}/kde/src/taglib-extras/
Step 13: Compile QtScriptGeneratorThis is another part that was recently moved out of the amarok svn and there are still a few issues with it. Just run the code below or download newer versions at http://code.google.com/p/qtscriptgenerator/downloads/list :
cd ${HOME}/kde/src The current version 0.1.0 has a few issues with *buntu. Because of that you need to patch it by running the following from the qtscriptgenerator-0.1.0 directory: nano include_everything.patch And add this code to it: --- b/generator/qtscript_masterinclude.h 2009-03-21 20:37:30.719523909 -0400 +++ a/generator/qtscript_masterinclude.h 2009-03-21 21:00:25.108149339 -0400 @@ -31,17 +31,41 @@ #include <QtUiTools/QtUiTools> -#ifndef QT_NO_XMLPATTERNS -# include <QtXmlPatterns/QtXmlPatterns> -#endif - -#ifndef QT_NO_WEBKIT -# include <QtWebKit/QtWebKit> -#endif - -#ifndef QT_NO_PHONON -# include <phonon/phonon> -#endif +#include <QtXmlPatterns/QtXmlPatterns> + +#include <QtWebKit/QtWebKit> + +#include "phonon/abstractaudiooutput.h" +#include "phonon/abstractmediastream.h" +#include "phonon/abstractvideooutput.h" +#include "phonon/addoninterface.h" +#include "phonon/audiooutput.h" +#include "phonon/audiooutputinterface.h" +#include "phonon/backendcapabilities.h" +#include "phonon/backendinterface.h" +#include "phonon/effect.h" +#include "phonon/effectinterface.h" +#include "phonon/effectparameter.h" +#include "phonon/effectwidget.h" +#include "phonon/mediacontroller.h" +#include "phonon/medianode.h" +#include "phonon/mediaobject.h" +#include "phonon/mediaobjectinterface.h" +#include "phonon/mediasource.h" +#include "phonon/objectdescription.h" +#include "phonon/objectdescriptionmodel.h" +#include "phonon/path.h" +#include "phonon/phonondefs.h" +#include "phonon/phononnamespace.h" +#include "phonon/platformplugin.h" +#include "phonon/seekslider.h" +#include "phonon/streaminterface.h" +#include "phonon/videoplayer.h" +#include "phonon/videowidget.h" +#include "phonon/videowidgetinterface.h" +#include "phonon/volumefadereffect.h" +#include "phonon/volumefaderinterface.h" +#include "phonon/volumeslider.h" #include "../qtbindings/qtscript_core/qtscriptconcurrent.h" Now run the following command to patch the source: patch -p1 < include_everything.patch Once you've done that, you can compile qtscriptgenerator and the plugings by running the following:
export INCLUDE=/usr/include/qt4 Once you're done you'll need to copy the plugins to /usr/lib/qt4/plugins/script:
cd ../plugins/script
Step 14: Compile Amarok 2Finally we've reached the point where we can compile Amarok 2:
cd ${HOME}/kde/src/amarok After the cmake you will get a few warnings but compiling and installation should go without errors.
Step 15: Update KDE configNow you need to update the KDE config: kbuildsycoca4 --noincremental
Step 16: Run Amarok 2Finally you can run Amarok 2 by issuing the following command in the terminal (eventually you need to logout of your session and back login to it). I have yet to find a way to start it from the menu.: amarok
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com







Recent comments
14 hours 38 min ago
16 hours 7 min ago
19 hours 41 min ago
22 hours 35 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 2 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 5 hours ago