# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils subversion

EAPI=3

DESCRIPTION="Web-based player for playing music from Vkontakte using Last.fm database"
HOMEPAGE="http://vk.com/app1832282"
ESVN_REPO_URI="http://tvoeradio-desktop.googlecode.com/svn/trunk"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="kdenotify"

DEPEND="x11-libs/qt-gui
x11-libs/qt-core
x11-libs/qt-webkit
www-plugins/adobe-flash"
RDEPEND="${DEPEND}"

src_unpack() {
        subversion_src_unpack
}

src_configure() {
        if use kdenotify; then 
                mv mainwindow.cpp mainwindow.cpp.orig
                sed 's|notify-send|kdialog|g' mainwindow.cpp.orig > mainwindow.cpp.tmp
                sed "s|-i tvoeradio-desktop|--title ""Your Radio"" --passivepopup|g" mainwindow.cpp.tmp > mainwindow.cpp
        fi
        qmake
}

src_install() {
        insinto /usr/bin
        doins ${PN}
        fperms 0755 /usr/bin/${PN}

        newicon images/icon256.png ${PN}.png
        make_desktop_entry ${PN} "Your Radio" ${PN} "Qt;Player;AudioVideo"
        mv ${ED}/usr/share/applications/${PN}-${PN}.desktop ${ED}/usr/share/applications/${PN}.desktop
}

Add a code snippet to your website: www.paste.org