# $Id: Portfile 52570 2009-06-19 01:29:05Z illogic-al@macports.org $

PortSystem          1.0
PortGroup           kde4   1.0

name                amarok
version             2.1.1
revision            2
categories          kde kde4
maintainers         illogic-al openmaintainer
description         Amarok, the world renown media player/.
long_description    Amarok is a music player and manager with an intuitive \
                    interface. It provides a variety of features which \
                    help you to discover and manage your music.
platforms           darwin
homepage            http://amarok.kde.org
master_sites	    kde:stable/${name}/${version}/src/
distfiles           ${name}-${version}.tar.bz2
use_bzip2           yes
checksums           md5     c4ebec02fd1e8b3ef0d7a041726e6780

depends_lib-append  port:kdelibs4 \
                    port:kdebase4-runtime \
                    port:taglib-devel port:taglib-extras \
                    port:qtscriptgenerator port:liblastfm \
                    path:lib/mysql5/libmysqld.a:mysql5-devel

#post-extract { 
#    reinplace \
#    "s|macro_optional_add_subdirectory( po )|#macro_optional_add_subdirectory( po )|" \
#    ${workpath}/${distname}/CMakeLists.txt
#}

configure.args-append	../${distname}

post-destroot {
    # This puts the bundle icons where they should go
    system "mv ${destroot}${prefix}/bin/amarok.app/Contents/Resources/* ${destroot}${applications_dir}/KDE4/Amarok.app/Contents/Resources/"
	system "rm -rf ${destroot}/${prefix}/bin"
}

