# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # NETBEANS 4 (PLATFORM 5) inherit eutils java-pkg DESCRIPTION="The NetBeans Java IDE, precompiled binaries" HOMEPAGE="http:/www.netbeans.org/" MY_PV=${PV//./_} MY_TARBALL="netbeans-${MY_PV}.tar.bz2" MY_DOCTARBALL="netbeans-${MY_PV}-docs-javadoc.tar.bz2" MY_DOWNLOAD_URL="http://www.netbeans.info/downloads/download.php?p=1&a=bd&os=2&lang=1&rv=4.1&b_bt=2" MY_PLATFORM_LEVEL="5" SRC_URI="${MY_TARBALL} doc? (http://www.netbeans.org/download/4_1/fcs/200505031930/66083d474e5fdfc80a1443fb851bd9d5/${MY_DOCTARBALL} )" LICENSE="Apache-1.1 Apache-2.0 SPL W3C sun-bcla-j2eeeditor sun-bcla-javac sun-javac as-is docbook sun-resolver" SLOT="0" KEYWORDS="~x86" IUSE="X gnome doc" RESTRICT="fetch nostrip" DEPEND="" RDEPEND=">=virtual/jre-1.4.2 >=virtual/jdk-1.4.2" pkg_nofetch() { ewarn "Please download ${MY_TARBALL} from:" einfo ${MY_DOWNLOAD_URL} einfo "Select \"NetBeans IDE 4.1 Archive\" in bz2 format and" einfo "click on \"NEXT\". Make sure you understand the license and" einfo "download. When finished, move it to ${DISTDIR}" if use doc; then einfo ewarn "Also download ${MY_DOCTARBALL} from the URL above and" einfo "move it to ${DISTDIR}" fi } src_unpack() { unpack ${MY_TARBALL} if use doc; then mkdir javadoc && cd javadoc unpack ${MY_DOCTARBALL} || die "Unable to extract javadoc" fi } src_install() { MY_S=${WORKDIR}/netbeans if use X; then insinto /usr/share/pixmaps doins ${MY_S}/nb${PV}/netbeans.png fi if use gnome; then # maybe make_desktop_entry was better? domenu ${FILESDIR}/icon/netbeans-bin-${PV}.desktop fi if use doc; then java-pkg_dohtml -r ${WORKDIR}/javadoc/* fi dodir /opt mv ${MY_S} ${D}/opt/${P} chown -R root:root ${D}/opt/${P} chmod +x ${D}/opt/${P}/bin/netbeans chmod +x ${D}/opt/${P}/platform${MY_PLATFORM_LEVEL}/lib/nbexec } pkg_postinst() { einfo "Installation was successfully completed. NetBeans will work" einfo "perfectly! However, note that NetBeans will ignore any installed" einfo "version of Tomcat 5 or ant, if they're already emerged in your" einfo "system, using its bundled version instead." einfo einfo "If you want your NetBeans to use those, refer to the documentation" einfo "for information on how to change the options so that NetBeans will" einfo "use your system's Tomcat 5 or ant." ebeep }