%define shortname visualvm %define uniquename io.github.visualvm %global debug_package %{nil} %global snapshot 20221016 %global short d05535f %global commit d05535fd13e281fe13ee10582678a4c043acddce Name: VisualVM Version: 2.1.5~git%{snapshot}.%{short} Release: 1%{?dist} Summary: VisualVM is a visual tool integrating commandline JDK tools and lightweight profiling capabilities License: GPL-2.0-only WITH Classpath-exception-2.0 URL: https://visualvm.github.io/ #Source0: https://github.com/oracle/%{shortname}/archive/refs/tags/%{version}.tar.gz Source0: https://github.com/oracle/%{shortname}/archive/%{short}.tar.gz Recommends: java Recommends: java-devel BuildRequires: ant BuildRequires: appstream BuildRequires: desktop-file-utils # Very smelly, requiring git to build. # This is due to the way netbeans is handled in the build script. BuildRequires: git BuildRequires: java-1.8.0-devel BuildRequires: java-1.8.0-headless BuildRequires: libicns-utils %description VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM). VisualVM organizes data about the JVM software that is retrieved by the Java Development Kit (JDK) tools and presents the information in a way that enables you to quickly view data on multiple Java applications. You can view data on local applications and applications that are running on remote hosts. You can also capture data about JVM software instances and save the data to your local system, and view the data later or share the data with others. %prep #%setup -qn "%{shortname}-%{version}" %setup -qn "%{shortname}-%{commit}" # TODO: netbeans could be packaged separately export JAVA_HOME=$(realpath $(rpm -ql $(rpm -q --whatprovides java-1.8.0-headless) | grep "jre" | head -n1)/..) cd visualvm ./build-nb.sh mv build/nb/nb140_platform_.zip ./ unzip nb140_platform_.zip %build cat > %{uniquename}.metainfo.xml < %{uniquename} %{name} %{summary} FSFAP GPL-2.0-only WITH Classpath-exception-2.0

VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM). VisualVM organizes data about the JVM software that is retrieved by the Java Development Kit (JDK) tools and presents the information in a way that enables you to quickly view data on multiple Java applications. You can view data on local applications and applications that are running on remote hosts. You can also capture data about JVM software instances and save the data to your local system, and view the data later or share the data with others.

%{uniquename}.desktop https://visualvm.github.io/images/visualvm_screenshot_20.png %{shortname} Development Java %{shortname}
EOF appstreamcli make-desktop-file %{uniquename}.metainfo.xml %{uniquename}.desktop echo "StartupWMClass=%{name} %{version}" >> %{uniquename}.desktop # Create the wrapper for /usr/bin cat >%{shortname}.sh < - Initial RPM release