1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 NBZ=nb${NBV}_${PN}_${NBT}.zip
10 inherit java-pkg-2 java-ant-2
12 DESCRIPTION="Integrates commandline JDK tools and profiling capabilities"
13 HOMEPAGE="https://visualvm.github.io"
15 # Netbeans plattform is already included in the main archive this time
16 # SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
17 # https://github.com/oracle/${PN}/releases/download/${PV}/${NBZ}"
18 SRC_URI="https://github.com/oracle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
20 LICENSE="GPL-2-with-linking-exception"
30 S="${WORKDIR}/${P}/${PN}"
32 EANT_BUILD_TARGET=build
33 INSTALL_DIR=/usr/share/${PN}
39 unpack "${S}"/"${NBZ}" # archive is included in the main archive
45 # Remove unneeded binaries
46 rm -rv netbeans/platform/lib/*.{dll,exe} \
47 netbeans/platform/modules/lib/{amd64/*.dll,i386,x86} || die
48 find netbeans/profiler/lib/deployed/jdk1? -mindepth 1 \
49 -maxdepth 1 ! -name linux-amd64 -exec rm -rv {} + || die
53 # this is the visualvm cluster
54 insinto ${INSTALL_DIR}
55 doins -r build/cluster netbeans/{platform,profiler}
57 # configuration file that can be used to tweak visualvm startup parameters
59 newins "${FILESDIR}"/${PN}-r1.conf ${PN}.conf
61 # visualvm runtime script
62 newbin "${FILESDIR}"/${PN}-r1.sh ${PN}
64 # makes visualvm entry
65 make_desktop_entry ${PN} VisualVM java "Development;Java;"