# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ MY_P="${PN}${PV//\./}" MY_D="/opt/win32/${P}" DESCRIPTION="Seperates Audio- & Video from PVA- or MPEG2-recordings (needs wine)" HOMEPAGE="http://www.offeryn.de/dv.htm" SRC_URI="http://www.dvbmagic.de/download/pvas/${MY_P}h.zip" LICENSE="as-is" SLOT="2.1" KEYWORDS="~x86" IUSE="" DEPEND="app-emulation/wine" S="${WORKDIR}" MY_SLOT="${SLOT/./}" function _wine_script() { echo "#!/bin/sh" echo "exec /usr/bin/wine 2>/dev/null \"$1\" \"\$@\"" } src_compile() { _wine_script "${MY_D}/share/cPVAS.exe" > "cpvas" _wine_script "${MY_D}/share/PVAStrumento.exe" > "pvastrumento" sed -e "s/\${PV}/${PV}/g" -e "s/\${SLOT}/${MY_SLOT}/g" < "${FILESDIR}/pvas.desktop" > "pvas${MY_SLOT}.desktop" cp -f "${FILESDIR}/pvas.png" "pvas${MY_SLOT}.png" } src_install() { exeinto "${MY_D}/bin" doexe cpvas pvastrumento dodir "/opt/bin" dosym "${MY_D}/bin/cpvas" "/opt/bin/cpvas${MY_SLOT}" dosym "${MY_D}/bin/pvastrumento" "/opt/bin/pvastrumento${MY_SLOT}" dosym "cpvas${MY_SLOT}" "/opt/bin/cpvas" dosym "pvastrumento${MY_SLOT}" "/opt/bin/pvastrumento" insinto "${MY_D}/share" doins cmdshell/*.exe gui/*.exe insinto "/usr/share/doc/${P}" doins gui/*.chm insinto "/usr/share/applications" doins *.desktop insinto "/usr/share/pixmaps" doins *.png } pkg_postinst() { echo einfo "To read the documentation install x11-misc/xchm and run:" einfo "xchm /usr/share/doc/${P}/pvastrumento.chm" echo }