%global giturl https://github.com/jgrapht/jgrapht %global gittag %{name}-%{version} Name: jgrapht Version: 1.5.2 Release: 1%{?dist} Summary: a Java library of graph theory data structures and algorithms # java files are EPL-2.0, readme is LGPL-2.1, others are not shipped License: LGPL-2.1 OR EPL-2.0 URL: https://jgrapht.org/ BuildArch: noarch ExclusiveArch: %{java_arches} noarch Source0: %{giturl}/archive/%{gittag}/%{name}-%{version}.tar.gz BuildRequires: maven-local BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) BuildRequires: mvn(org.antlr:antlr4-maven-plugin) BuildRequires: mvn(com.google.code.maven-replacer-plugin:replacer) BuildRequires: mvn(it.unimi.dsi:fastutil) BuildRequires: mvn(com.mxgraph:jgraphx) %description JGraphT is a free Java class library that provides mathematical graph-theory objects and algorithms. %package core Summary: JGraphT Core %description core Core library of JGraphT %package demo Summary: JGraphT Demo %description demo Demo classes of JGraphT %package ext Summary: JGraphT Ext %description ext Extensions library of JGraphT %package guava Summary: JGraphT Guava %description guava Adapter classes of JGraphT for the Guava library %package io Summary: JGraphT I/O %description io Importers/Exporters of JGraphT for various graph formats %package opt Summary: JGraphT Optimized Graphs %description opt Optimized graph implementations of JGraphT %prep %setup -q -n %{name}-%{gittag} %pom_remove_parent %pom_disable_module jgrapht-dist %pom_disable_module jgrapht-unimi-dsi %pom_remove_dep -r com.googlecode.junit-toolbox:junit-toolbox %pom_remove_dep -r org.openjdk.jmh:jmh-core %pom_remove_dep -r org.openjdk.jmh:jmh-generator-annprocess %pom_remove_plugin -r :maven-assembly-plugin %pom_remove_plugin -r :maven-deploy-plugin %pom_remove_plugin -r :maven-failsafe-plugin %pom_remove_plugin -r :maven-javadoc-plugin %pom_remove_plugin -r :maven-release-plugin %pom_remove_plugin -r org.eclipse.m2e:lifecycle-mapping %pom_change_dep -r com.github.vlsi.mxgraph:jgraphx com.mxgraph: sed -i 's|com.github.vlsi.mxgraph.jgraphx|com.mxgraph.jgraphx|' \ jgrapht-ext/src/main/java/module-info.java # It needs guava package to have Automatic-Module-Name in MANIFEST.MF # So until then, it's removed rm jgrapht-guava/src/main/java/module-info.java %mvn_package :%{name} __noinstall %build # Skip tests, they are not runnable as many test dependencies are missing. # Javadoc failed, related to module source path %mvn_build -s -f -j %install %mvn_install %files core -f .mfiles-%{name}-core %license license-EPL.txt license-LGPL.txt %doc CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS.md HISTORY.md README.md %files demo -f .mfiles-%{name}-demo %files ext -f .mfiles-%{name}-ext %files guava -f .mfiles-%{name}-guava %files io -f .mfiles-%{name}-io %files opt -f .mfiles-%{name}-opt %changelog * Sun Jul 02 2023 Didik Supriadi - 1.5.2-1 - Initial package