# Copyright 2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit fdo-mime DESCRIPTION="mp3/ogg/flac/sid/mod/nsf music player based on GTK2" HOMEPAGE="http://deadbeef.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="|| ( GPL-2 LGPL-2.1 )" EAPI="2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" RDEPEND="media-libs/libvorbis media-libs/libmad media-libs/libogg x11-libs/gtk+:2 media-libs/libsamplerate media-libs/alsa-lib" DEPEND="" src_unpack() { unpack ${A} # Add associations for NSF and SPC files sed -i -e 's:^MimeType=\(.*\)$:MimeType=\1;audio/x-spc;audio/x-rsn;audio/x-nsf;:' "${S}/deadbeef.desktop.in" } src_configure() { econf || die "Configure failed" } src_compile() { emake || die "Make failed" } src_install() { emake DESTDIR="${D}" install || die "Install failed" # Install NSF and SPC MIME types insinto /usr/share/mime/packages doins ${FILESDIR}/x-nsf.xml doins ${FILESDIR}/x-spc.xml } pkg_postinst() { # Register new MIME types and activate file associations fdo-mime_mime_database_update fdo-mime_desktop_database_update } pkg_postrm() { # Unregister MIME types and deactivate file associations fdo-mime_desktop_database_update fdo-mime_mime_database_update }