Name: jmc Version: 7.0.0 Release: 2%{?dist} Summary: Java Mission Control is a profiling and diagnostics tool License: UPL URL: http://openjdk.java.net/projects/jmc/ # original source: http://hg.openjdk.java.net/jmc/jmc/archive/tip.tar.gz # Execute this script to download and generate source tarball: # ./generate_jmc_tarball.sh Source0: %{name}-%{version}.tar.gz Source1: %{name}.desktop Source2: %{name}.1 # Remove optional twitter related functionality Patch0: 0_remove_twitter.patch # Update javamail dependency names to match what is found in Fedora Patch1: 1_javamail.patch # Update javax dependency names to match what is found in Fedora Patch2: 2_javax.patch # Remove maven build profiles that won't be used in local build Patch3: 3_remove_profiles.patch # Remove localization files that currently cannot be supported # due to a packaging issue for Eclipse language packs # eclipse-nls-ja and eclipse-nls-zh # They currently provide multiple archs within the same package # and the local build system cannot fulfill dependencies from them Patch4: 4_remove_localization.patch # Remove optional openjfx related functionality Patch5: 5_remove_jfx.patch # Remove unused module org.openjdk.jmc.ide.jdt Patch6: 6_remove_ide_jdt.patch # Remove unused remote repository definition Patch7: 7_remove_buchen_repo.patch # Add dependency on org. hamcrest-core to provide class used in unit tests Patch8: 8_add_hamcrest.patch BuildRequires: buildnumber-maven-plugin BuildRequires: directory-maven-plugin BuildRequires: eclipse-tests BuildRequires: fix-info-plist-maven-plugin BuildRequires: glassfish-annotation-api BuildRequires: jaf BuildRequires: javamail BuildRequires: jmc-core BuildRequires: maven-deploy-plugin BuildRequires: maven-enforcer-plugin BuildRequires: maven-local BuildRequires: tycho BuildRequires: desktop-file-utils Requires: java-11-openjdk %description Java Mission Control is a powerful profiler for HotSpot JVMs and has an advanced set of tools that enables efficient and detailed analysis of the extensive data collected by Java Flight Recorder. The tool chain enables developers and administrators to collect and analyze data from Java applications running locally or deployed in production environments. %global debug_package %{nil} %global _jmcdir %{_libdir}/%{name} %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %pom_disable_module releng %pom_disable_module l10n application %pom_disable_module org.openjdk.jmc.updatesite.ide application %pom_disable_module org.openjdk.jmc.updatesite.rcp application %pom_remove_plugin com.github.spotbugs:spotbugs-maven-plugin %build %mvn_build -j -- -Dspotbugs.skip=true %install # change jmc.ini to use system java (remove -vm option line) sed -i '/^-vm$/d' %{_builddir}/%{name}-%{version}/target/products/org.openjdk.jmc/%{_os}/gtk/%{_arch}/%{name}.ini sed -i '/^..\/..\/bin\/$/d' %{_builddir}/%{name}-%{version}/target/products/org.openjdk.jmc/%{_os}/gtk/%{_arch}/%{name}.ini # delete unnecessary files rm -r %{_builddir}/%{name}-%{version}/target/products/org.openjdk.jmc/%{_os}/gtk/%{_arch}/p2/ # move contents of target/products/org.openjdk.jmc/linux/gtk/x86_64/ to /usr/lib/jmc/ install -d -m 755 %{buildroot}%{_jmcdir}/ cp -p -r %{_builddir}/%{name}-%{version}/target/products/org.openjdk.jmc/%{_os}/gtk/%{_arch}/* %{buildroot}%{_jmcdir}/ # create symlink to jmc in /usr/bin/ install -d -m 755 %{buildroot}%{_bindir} ln -s %{_jmcdir}/%{name} %{buildroot}%{_bindir}/%{name} # create application launcher in desktop menu install -d -m 755 %{buildroot}%{_datadir}/pixmaps mv %{buildroot}%{_jmcdir}/icon.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm chmod 644 %{buildroot}%{_datadir}/pixmaps/%{name}.xpm desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} # install pom file install -d -m 755 %{buildroot}%{_datadir}/maven-poms/%{name} install -p -m 644 %{_builddir}/%{name}-%{version}/pom.xml \ %{buildroot}%{_datadir}/maven-poms/%{name}/%{name}.pom # install manpage install -d -m 755 %{buildroot}%{_mandir}/man1 install -p -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{name}.1 %files %license license/LICENSE.txt %license license/THIRDPARTYREADME.txt %doc README.md %{_jmcdir} %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} %{_datadir}/maven-poms/%{name} %{_datadir}/pixmaps/%{name}.xpm %{_datadir}/applications/%{name}.desktop %changelog * Mon Nov 05 2018 Salman Siddiqui - 7.0.0-2 - Changed installation directory from /usr/share/java/jmc to /usr/share/jmc * Fri Sep 14 2018 Salman Siddiqui - 7.0.0-1 - Initial packaging