# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Prebuilt documentation for media-sound/lilypond" HOMEPAGE="http://lilypond.org/" SRC_URI="http://lilypond.org/download/binaries/documentation/${PN%-docs}-${PV}-1.documentation.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="" RDEPEND="" src_install() { einfo "Installing documentation" cp -dr ${WORKDIR}/{Documentation,examples.html,input} \ ${D}/usr/share/doc/${PF}/ || die "doc install failed" # lilypond fails to uninstall docs cleanly because of recursive # symlinks. Here we eliminate the symlinks entirely and rebuild # all the html links that used them. find ${D}/usr/share/doc/${PF}/Documentation/user/{lilypond,music-glossary} \ -maxdepth 1 -name "*.html" | xargs sed -i -e 's:source/:../../../:g' find ${D}/usr/share/doc/${PF}/Documentation/user -maxdepth 1 \ -name "*.html" | xargs sed -i -e 's:source/:../../:g' rm ${D}/usr/share/doc/${PF}/Documentation/user/lilypond/source \ ${D}/usr/share/doc/${PF}/Documentation/user/source \ ${D}/usr/share/doc/${PF}/Documentation/user/music-glossary/source }