# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="A media aggregator that automatically downloads podcast's to your computer or portable device." HOMEPAGE="http://www.castpodder.net/" MY_NAME="CastPodder" SRC_URI="http://dev-1.borgforge.net:82/castpodder/chrome/site/downloads/${MY_NAME}-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="X" DEPEND="=dev-lang/python-2.4* =dev-python/wxpython-2.6* >dev-python/pyxmms-2.0 >=dev-python/pygtk-2.6" S=${WORKDIR}/${PN} # this is not pretty as it needs polishing. # * I couldn't figure out the dosym command so brute forced it. # * The make_desktop_entry doesn't work # * I've made no attempt to put the documentation in the right places. # * probably should be using more variables instead of hard coded paths pkg_preinst() { if ! built_with_use dev-lang/python berkdb ; then eerror "Re-emerge python with USE=\"berkdb\"" die "python is missing berkdb support" fi if ! built_with_use dev-python/wxpython unicode ; then eerror "Re-emerge wxpython with USE=\"unicode\"" die "wxpython is missing unicode support" fi } # install into /usr/share/castpodder # link /usr/share/castpodder/castpodder to /usr/bin/castpodder src_unpack() { unpack ${A} cd "${S}" # the following is done in castpodder's install.sh, I'm guessing # to handle any accidental inclusion of the compiled files. # remove all pyc files so that they don't get "accidently" installed for PYC in `find -name "*.pyc" -type f`; do /bin/rm -f $PYC; done for PYO in `find -name "*.pyo" -type f`; do /bin/rm -f $PYO; done # fix file permissions find . -type f -exec chmod 664 {} ";" find . -name "*.sh" -type f -exec chmod 755 {} ";" chmod 755 CastPodderGui.py # change default install directory in the startup script sed -i -e "s:/opt/CastPodder:/usr/share/castpodder:g" ${S}/CastPodder.sh } src_install() { # copy files into /usr/share/castpodder dodir /usr/share/castpodder cp -f -R * "${D}"/usr/share/castpodder # create a symbolic link from /usr/share/castpodder/CastPodder.sh to /usr/bin/CastPodder dosym /usr/share/castpodder/CastPodder.sh /usr/bin/CastPodder } pkg_postinst() { # add application to desktop # does not work # make_desktop_entry ${D}/${MY_NAME} ${MY_NAME} ${D}/${MY_NAME}.png Audio einfo "Place a shortcut on your desktop with /usr/bin/CastPodder as the binary executable." einfo "For a desktop icon use the CastPodder.png in /usr/share/castpodder." } pkg_postrm() { rm -f /usr/bin/CastPodder }