Installing Amarok 1.4 on Arch Linux

by

Installing Amarok 1.4 on Arch Linux is a piece of cake. The package is present on AUR and it has patches for Wikipedia problem, the modified cover fetcher and some others. All you need to do is —

yaourt -S amarok1

and you are done. This will get Amarok 1.4 up and running on your system. But making it work is a bit of a problem. As the binaries are installed in a different directory viz. /opt/amarok/ you will need to add that path to your PATH varible. This will make sure amarok starts without the amarokapp error but the collection scanner does not seem to work. And without a collection there is no way I am going to use amarok. I tried to find various ways around this problem (I had Amarok 2 installed the first time this was done, tried installing without it on the system, adding the /opt/ path at the start of $PATH ) but they did not work so I decided to edit the PKGBUILD file provided on the AUR page. Few of the other problems that I have solved here and my assumptions are mentioned below —

  • I removed the /opt/amarok prefix so now the amarok1 pkg will conflict amarok 2.2 — only one can be installed at a time.
  • I found that ‘ruby’ is included as a dependency in the PKGBUILD where as ruby1.8 is a build dependency. Amarok uses ruby1.8 so I modified the PKGBUILD to set ruby1.8 (which is compiled from AUR) as a dependency. (EDIT — Just as I finished this article, it seems the AUR PKGBUILD has added the patches to compile Amarok1 with ruby1.9 … but the scripts still require ruby1.8 ๐Ÿ˜ฆ … you always have a choice ๐Ÿ™‚ )
  • I also modified the ruby1.8 PKGBUILD to remove the postfixes used there. This assumes that you do not use ruby 1.9. All Amarok scripts that I know are either ruby1.8 based or pyqt3 (handled later). So without this, those scripts fail. ๐Ÿ˜ฆ
  • Due to this bug in the current pyqt3 package, I had to to install pyqt3 from source. ( This is insanely simple due to ABS).

I am attaching the modified PKGBUILD below. Use with care ๐Ÿ™‚

  • Amarok1 PKGBUILD (With my modifications)
  • # Contributor: Juanma Hernรกndez <juanmah@gmail.com>
    # Modified by Chinmay Kamat <chinmaykamat@gmail.com>
    pkgname=amarok1
    _origname=amarok
    pkgver=1.4.10
    pkgrel=7
    pkgdesc="amaroK - a media player for KDE - v1.4.10 xine engine with wikipedia patch (single package)"
    arch=("i686" "x86_64")
    url="http://amarok.kde.org"
    license=('GPL')
    depends=('xine-lib>=1.1.3' 'libmysqlclient>=5.0.45' 'postgresql-libs>=8.2.4' 'ruby1.8' 'tunepimp>=0.5.3' 'kdelibs3>=3.5.7' 'libgpod>=0.6.0'  'libifp>=1.0.0.2' 'libnjb>=2.2.5' 'libvisual>=0.4.0')
    makedepends=('pkgconfig' 'kdelibs3' 'libmtp>=0.2.6.1' 'xine-lib>=1.1.8' 'sdl>=1.2.12' 'ruby1.8')
    conflicts=('amarok')
    provides=('amarok1')
    install=amarok.install
    source=("ftp://ftp.solnet.ch/mirror/KDE/stable/amarok/${pkgver}/src/${_origname}-${pkgver}.tar.bz2"
    	"amarok_addaspodcast.desktop"
            "wikipedia.patch"
            "libmtp.patch"
            "gcc44.patch"
            "amarok-1.4.10.coverfetcher.diff")
    options=(!makeflags)
    
    build() {
      patch -Np0 -i $srcdir/wikipedia.patch || return 1
      patch -Np0 -i $srcdir/libmtp.patch || return 1
      patch -Np0 -i $srcdir/gcc44.patch || return 1
      patch -Np0 -i $srcdir/amarok-1.4.10.coverfetcher.diff || return 1
    
      cd ${startdir}/src/${_origname}-${pkgver}
      . /etc/profile.d/qt3.sh
      . /etc/profile.d/kde3.sh
    
      # prepare build
      RUBY=/opt/ruby1.8/bin/ruby  ./configure \
      	--with-gnu-ld \
    	--enable-mysql \
    	--enable-postgresql \
    	--with-mp4v2 \
    	--with-ifp \
    	--with-libnjb \
    	--with-libmtp \
    	--with-libgpod \
    	--without-arts \
    	--without-gstreamer \
    	--with-xine \
    	--without-nmm \
    	--without-mas \
    	--with-libvisual \
    	--disable-debug \
    	--enable-debug=no \
    	--without-xmms || return 1
    
      # build
      sed -i -e 's/konquisidebar//g' amarok/src/Makefile
      make || return 1
      make DESTDIR=${startdir}/pkg install || return 1
    
      mkdir -p ${startdir}/pkg/opt/kde/share/apps/konqueror/servicemenus/
      install -m644 ${startdir}/src/amarok_addaspodcast.desktop ${startdir}/pkg/opt/kde/share/apps/konqueror/servicemenus/
    }
    md5sums=('3bdbf26181bf5e5925f48968caba7ac2'
             '7736a7e3e22b15818180df3cee7e4a79'
             'a93eb0dad2078afa045a69f38256b369'
             '02eb286127594b9427d27da7eb01f0de'
             'cfa9310dec03c33048e5a067a0334266'
    	 'f4e8754cde659342bdfd3fca36612bb5')
    
  • Ruby1.8 PKGBUILD (With my modifications)
  • # Contributor: v01d
    # Modified by Chinmay Kamat <chinmaykamat@gmail.com>
    pkgname='ruby1.8'
    pkgver=1.8.7_p174
    _pkgver=1.8.7-p174
    pkgrel=1
    pkgdesc="An object-oriented language for quick and easy programming"
    arch=('i686' 'x86_64')
    license=('custom')
    url="http://www.ruby-lang.org/en/"
    depends=('gdbm>=1.8.3' 'db>=4.7.25' 'openssl>=0.9.8k' 'zlib>=1.2.3.3' 'readline>=5.2.013')
    makedepends=('tk>=8.5')
    provides=('ruby=1.8.7')
    source=(ftp://ftp.ruby-lang.org/pub/ruby/stable/ruby-${_pkgver}.tar.bz2)
    options=('!emptydirs')
    depends=('gdbm>=1.8.3' 'db>=4.7.25' 'openssl>=0.9.8k' 'zlib>=1.2.3.3' 'readline>=5.2.013')
    optdepends=('tk: for Ruby/TK')
    
    build() {
      cd "${srcdir}/ruby-${_pkgver}"
      ./configure --prefix=/opt/ruby1.8 --enable-shared --enable-pthread || return 1
      make || return 1
      make DESTDIR="${pkgdir}" install || return 1
    
      install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" || return 1
    
      mkdir -p $pkgdir/usr/bin
      for i in erb irb rdoc ri ruby testrb; do
        ln -s /opt/ruby1.8/bin/$i $pkgdir/usr/bin/$i
      done
    }
    md5sums=('88c45aaf627b4404e5e4273cb03ba2ee')
    
  • Finally, the steps to install pyqt3 from source —

Get the PKGBUILD for it from here. Then to install do the following

$makepkg -s PKGBUILD

This should work if you have sudo. If you use su, do the following

#makepkg --asroot -s PKGBUILD

This creates the pyqt3*.tar.gz pacakge to
To install the package —

#pacman -U pyqt3*.tar.gz

And you are done. With all this, I was able to use the wiki-lyrics, copycover,lyricsID3 etc scripts — Amarok 1.4 will all bells and whistles ๐Ÿ˜€

<RANT> — After using Amarok 2,ย  Sonata+MPD, qtmpc+MPD, Banshee, Exaile, Listen etc etc … I still feel that Amarok 1.4 is the best player available. Amarok 2.2 is good and Amarok 2.3 will be better. I will shift full time to the 2.x series soon… until then Amarok 1.4 FTW !!! </RANT>

Advertisements

4 Responses to “Installing Amarok 1.4 on Arch Linux”

  1. tangyorangesour Says:

    umm.. what happened to your ubuntu fetish?

  2. Aditya Says:

    1. You were not sure if you should use Arch asking me if all the hand editing is ‘worth’ it…
    2. You finally installed Arch..
    3. Now you are a ABS hacker?
    4. What has the world come to…

  3. CDK Says:

    @both –> things change ๐Ÿ™‚

  4. Hashbang #! and amarok1 on Arch « Passing Thoughts Says:

    […] or two days after writing the article about amarok1 installation on Arch, a new version of amarok1 with ruby1.9 support was uploaded. As most of the ruby scripts for […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: