# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils DESCRIPTION="yEd is a very powerful graph editor that is written entirely in the Java programming language." SRC_URI="yed.sh" HOMEPAGE="http://jeuclid.sourceforge.net/" LICENSE="yEd Software License Agreement" SLOT="0" KEYWORDS="~x86" DEPEND=">=virtual/jre-1.4" IUSE="examples" RESTRICT="fetch" S=${WORKDIR} INSTDIR="/opt/${P}" pkg_nofetch() { einfo einfo " Due to license restrictions, we cannot fetch the" einfo " distributables automatically." einfo einfo " 1. Visit http://www.yworks.com/en/products_yed_about.htm#download" einfo " 2. Download ${A}" einfo " 3. Move the file to ${DISTDIR}" einfo } src_unpack() { tail -n +382 ${DISTDIR}/${A} > ${T}/sfx_archive.tar.gz mkdir ${T}/content tar -xf ${T}/sfx_archive.tar.gz -C ${T}/content unzip ${T}/content/content.zip -d ${WORKDIR} 1>/dev/null } src_install() { dodir ${INSTDIR} cp ${S}/license.html ${D}${INSTDIR} cp ${S}/${PN}.jar ${D}${INSTDIR} echo "#!/bin/sh" > ${D}${INSTDIR}/${PN} echo "" >> ${D}${INSTDIR}/${PN} echo "java -jar ${INSTDIR}/${PN}.jar" >> ${D}${INSTDIR}/${PN} chmod 644 ${D}${INSTDIR}/* chmod +x ${D}${INSTDIR}/${PN} if use examples ; then dodir ${INSTDIR}/graphs cp ${S}/graphs\\autobahn.ygf ${D}${INSTDIR}/graphs/autobahn.ygf cp ${S}/graphs\\computers.ygf ${D}${INSTDIR}/graphs/computers.ygf cp ${S}/graphs\\er_diagram.ygf ${D}${INSTDIR}/graphs/er_diagram.ygf cp ${S}/graphs\\netgroup.ygf ${D}${INSTDIR}/graphs/netgroup.ygf cp ${S}/graphs\\netgroup_folded.ygf ${D}${INSTDIR}/graphs/netgroup_folded.ygf cp ${S}/graphs\\netgroup_labelled.ygf ${D}${INSTDIR}/graphs/netgroup_labelled.ygf cp ${S}/graphs\\problem_solving.gml ${D}${INSTDIR}/graphs/problem_solving.gml cp ${S}/graphs\\visual_features.ygf ${D}${INSTDIR}/graphs/visual_features.ygf chmod 644 ${S}/graphs/* fi dosym ${D}${INSTDIR}/${PN} /usr/bin/${PN} }