# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="A proxy server for the last.fm radio streams. It allows you to use any stream-capable audio player to listen to last.fm" HOMEPAGE="http://vidar.gimp.org/lastfmproxy/" SRC_URI="http://vidar.gimp.org/lastfmproxy/lastfmproxy-1.1alpha5.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="" DEPEND="" RDEPEND="" S=${WORKDIR}/lastfmproxy-1.1alpha5 src_install() { BASE=/usr/share/lastfmproxy cd ${S} dodoc COPYING.txt README.txt ChangeLog.txt insinto ${BASE} doins -r *.py data fperms 755 ${BASE}/changestation.py ${BASE}/main.py dodir /usr/bin #dosym ${BASE}/main.py /usr/bin/lastfmproxy # workaround: main.py needs to be executed from current dir echo "#!/bin/bash cd ${BASE}; ./main.py" > lastfmproxy dobin lastfmproxy #dosym ${BASE}/changestation.py /usr/bin/lastfmproxy-station # workaround: firefox doesn't accept symlink protocol:// handlers echo "#!/bin/bash cd ${BASE}; ./changestation.py \$@" > lastfmproxy-station dobin lastfmproxy-station newinitd ${FILESDIR}/lastfmproxy.rc lastfmproxy } pkg_postinst() { einfo "" einfo "Please modify:" einfo " /usr/share/lastfmproxy/config.py" einfo "with last.fm credentials and/or proxy information." einfo "" einfo "Then, to start lastfmproxy:" einfo " /etc/init.d/lastfmproxy start" einfo "" einfo "Here's how to make the lastfm://station links work:" einfo ' In Firefox, open the location "about:config"' einfo ' Right-click, select "New String"' einfo ' As name, enter "network.protocol-handler.app.lastfm", "OK"' einfo ' As value, enter /usr/bin/lastfmproxy-station, then OK' einfo "" }