%if 0%{?fedora} # Unavailable deps # https://bugzilla.redhat.com/show_bug.cgi?id=1282222 %bcond_with touchgraph %endif Name: jgrapht-core Version: 0.9.2 Release: 1%{?dist} Summary: A Java class library for graph-theory data structures and algorithms License: EPL and LGPLv2+ URL: http://jgrapht.org/ Source0: https://github.com/jgrapht/jgrapht/archive/jgrapht-%{version}.tar.gz BuildRequires: maven-local BuildRequires: mvn(com.mxgraph:jgraphx) %if %{with touchgraph} BuildRequires: mvn(com.touchgraph:TGGraphLayout) %endif BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.openjdk.jmh:jmh-core) BuildRequires: mvn(org.openjdk.jmh:jmh-generator-annprocess) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildRequires: mvn(xmlunit:xmlunit) BuildArch: noarch %description JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms. %package ext Summary: JGraphT - Ext %description ext JGraphT extensions library. %if %{with touchgraph} %package touchgraph Summary: JGraphT to Touchgraph converter %description touchgraph JGraphT to Touchgraph converter. %endif %package parent Summary: JGraphT - Parent POM %description parent JGraphT - Parent POM. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n jgrapht-jgrapht-%{version} find -name '*.class' -print -delete find -name '*.jar' -print -delete # Unneeded %pom_disable_module jgrapht-dist # NON free triemax:jalopy-maven:1.9.4-108 %pom_remove_plugin :jalopy-maven # Unneeded tasks %pom_remove_plugin :maven-release-plugin %pom_remove_plugin :maven-shade-plugin jgrapht-ext # Remove classpath %pom_xpath_set pom:addClasspath false jgrapht-demo %if %{without touchgraph} %pom_disable_module jgrapht-touchgraph %else # Use system TGGraphLayout %pom_xpath_remove pom:repositories jgrapht-touchgraph %pom_remove_plugin :maven-shade-plugin jgrapht-touchgraph %pom_change_dep -r :jgrapht-ext ::'${project.version}' jgrapht-touchgraph %endif # Fix deps scope %pom_change_dep :junit ::4.10:test jgrapht-ext %pom_change_dep :xmlunit ::1.3:test jgrapht-ext %pom_change_dep -r :jgrapht-core ::'${project.version}' jgrapht-ext # Upgrade org.tinyjee.jgraphx:jgraphx:2.0.0.1 %pom_change_dep org.tinyjee.jgraphx:jgraphx com.mxgraph:jgraphx:3.1.2.0 jgrapht-ext # Use NON available jgraph:jgraph:5.13.0.0 %pom_remove_dep jgraph:jgraph jgrapht-ext rm jgrapht-ext/src/main/java/org/jgrapht/ext/JGraphModelAdapter.java # Need jgraph:5.13.0.0 %pom_disable_module jgrapht-demo # https://github.com/jgrapht/jgrapht/issues/190 sed -i "s,59 Temple Place,51 Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301," license-LGPL.txt %build %if %{with touchgraph} opts=-- -Ptouchgraph %endif %mvn_build -s $opts %install %mvn_install %files -f .mfiles-jgrapht-core %doc HISTORY.md README.md %license license-EPL.txt license-LGPL.txt %files ext -f .mfiles-jgrapht-ext %files parent -f .mfiles-jgrapht %license license-EPL.txt license-LGPL.txt %if %{with touchgraph} %files touchgraph -f .mfiles-jgrapht-touchgraph %endif %files javadoc -f .mfiles-javadoc %license license-EPL.txt license-LGPL.txt %changelog * Wed Apr 13 2016 gil cattaneo 0.9.2-1 - initial rpm