# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Nonofficial ebuild by Ycarus. For new version look here : http://gentoo.zugaina.org/

inherit eutils mono

DESCRIPTION="The fair interface to the iTunes Music Store (C#)"
DESCRIPTION_FR="Une interface a iTunes d'Apple sans DRM (en C#)"
HOMEPAGE="http://www.nanocrew.net/software/sharpmusique/"
SRC_URI="http://www.nanocrew.net/software/sharpmusique/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
RESTRICT="nomirror"

IUSE="vlc"

DEPEND=">=dev-lang/mono-1.1.6
	>=dev-dotnet/gtk-sharp-1.9.2
	>=dev-dotnet/glade-sharp-1.9.2
	vlc? ( media-video/vlc )"


src_install() {
    dodir /usr/lib/sharpmusique /usr/bin
    exeinto /usr/lib/sharpmusique
    doexe SharpMusique.exe
cat << EOF > "${D}/usr/bin/sharpmusique"
#!/bin/sh
cd "${chdir}"
mono /usr/lib/sharpmusique/SharpMusique.exe
EOF
    chmod go+rx "${D}/usr/bin/sharpmusique"
}