# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="NetBeans ${PV} IDE for Java" IUSE="kde gnome" HOMEPAGE="http://www.netbeans.org" BUILDFOLDER=${WORKDIR}/netbeans-src/nbbuild BUILDDESTINATION=${BUILDFOLDER}/netbeans SRC_URI="netbeans-4_0-src-ide_sources.tar.bz2" MY_RV=${PV} FETCH_LOCATION="http://www.netbeans.info/downloads/download.php?p=1&a=bd&os=2&lang=1&rv=${MY_RV}&b_bt=2" RESTRICT="fetch" SLOT="0" LICENSE="GPL-2 Apache-1.1 sun-bcla-j2ee JPython SPL" KEYWORDS="~x86" #Stolen from the 3.6 ebuild because this would appear to apply to this as well. #Still need to add JPython, Sun Public and DynamicJava licenses #sun-j2ee actually contains Sun Binary Code license #will have to be renamed and containing it ebuilds updated at spome point.. DEPEND=">=virtual/jdk-1.4.2 >=dev-java/ant-1.5.3" pkg_nofetch() { einfo "Please download ${A} from" einfo "${FETCH_LOCATION}" einfo "Select the ${PV} source package and move it to" einfo "${DISTDIR}" } src_unpack() { unpack ${A} } src_compile() { # The build will attempt to display graphical # dialogs for the licence agreements if this is set. unset DISPLAY # Move into the folder where the build.xml file lives. cd ${BUILDFOLDER} # Specify the build-nozip target otherwise it will build # a zip file of the netbeans folder, which will copy directly. ant -buildfile build.xml build-nozip } src_install() { # Remove non-x86 Linux binaries rm -f ${BUILDDESTINATION}/netbeans.exe rm -f ${BUILDDESTINATION}/netbeans.cmd rm -f ${BUILDDESTINATION}/nb.exe rm -f ${BUILDDESTINATION}/ide4/ant/bin/*.bat rm -f ${BUILDDESTINATION}/ide4/ant/bin/*.cmd rm -f ${BUILDDESTINATION}/nb4.0/jakarta-tomcat-5.0.28/bin/*.bat rm -f ${BUILDDESTINATION}/nb4.0/jakarta-tomcat-5.0.28/bin/*.exe rm -f ${BUILDDESTINATION}/platform4/lib/nbexec.cmd rm -f ${BUILDDESTINATION}/platform4/lib/nbexec.exe dodir /opt/${P} cd ${BUILDDESTINATION} dodoc build_info dohtml CREDITS.html README.html netbeans.css cp -Rdp bin etc ide4 \ nb4.0 platform4 build_info \ moduleCluster.properties module_tracking.xml \ ${D}/opt/${P} dodir /usr/bin dosym /opt/${P}/bin/netbeans /usr/bin/netbeans # If either Gnome or KDE are installed, then install the icons. if use gnome || use kde; then echo "Adding icons...." insinto /usr/share/pixmaps doins ${FILESDIR}/netbeans.png fi # If Gnome is installed, then copy in the desktop entry. if use gnome ; then einfo "Adding Gnome support...." insinto /usr/share/gnome/apps/Development doins ${FILESDIR}/netbeans.desktop echo "Exec=/opt/${P}/bin/runide.sh" >> ${D}/usr/share/gnome/apps/Development/netbeans.desktop echo >> ${D}/usr/share/gnome/apps/Development/netbeans.desktop fi # If KDE is installed, the copy in the menu entry to the # "Development" menu. # Unfortunately, the file doesn't contain any internationalized # text at the moment. if use kde ; then einfo "Adding KDE support...." DESKTOP_FILE=netbeans-KDE.desktop DESKTOP_DIR=${KDEDIR}/share/applnk/Development DESKTOP=${DESKTOP_DIR}/${DESKTOP_FILE} insinto ${DESKTOP_DIR} doins ${FILESDIR}/${DESKTOP_FILE} echo "Name=NetBeans ${PV}" >> ${D}/${DESKTOP} echo "Exec=/usr/bin/netbeans" >> ${D}/${DESKTOP} echo "Icon=/usr/share/pixmaps/netbeans.png" >> ${D}/${DESKTOP} echo >> ${D}/${DESKTOP} fi }