inherit eutils DESCRIPTION="The Last.fm player allows you to listen to their internet radio which is tailored to your music profile" HOMEPAGE="http://www.last.fm" SRC_URI="http://static.last.fm/player/LastfmLinux-${PV}.tar.bz2" LICENSE="BSD" SLOT="0" KEYWORDS="~x86" IUSE="aoss" RESTRICT="nomirror" S="${WORKDIR}/Last.fm-${PV}" RDEPEND="virtual/x11" src_install() { local destination="/opt/lastfm-bin" dodir ${destination} exeinto ${destination} doexe player dodir ${destination}/data insinto ${destination}/data doins data/* dodir ${destination}/data/buttons insinto ${destination}/data/buttons doins data/buttons/* diropts -m0775 -g audio dodir ${destination}/cache keepdir ${destination}/cache # make_wrapper is not doing what I want exeinto /usr/bin cmd_player="${destination}/player" if use aoss ; then cmd_player="/usr/bin/aoss ${cmd_player}" fi local tmpwrapper=$(emktemp) cat << EOF > "${tmpwrapper}" #!/bin/sh cd "${destination}" exec ${cmd_player} "\$@" EOF chmod go+rx "${tmpwrapper}" newexe "${tmpwrapper}" "lastfm-bin" newicon data/icon.png lastfm-bin.png make_desktop_entry lastfm-bin "Last.fm Player" lastfm-bin.png } pkg_postinst() { einfo "In order to use the Last.fm player with your mozilla based browser," einfo "You must follow these steps:" einfo einfo " 1. Go to \"about:config\" using the location bar" einfo " 2. Right-click on the page. Select \"New\" and then \"String\"" einfo " 3. Type in the name field: \"network.protocol-handler.app.lastfm\"" einfo " 4. Type in the value field: \"/usr/bin/lastfm-bin\"" einfo einfo "If you experiance awkward fonts or widgets, you may consider" einfo "running \"qtconfig\" and change the settings" }