%global namedreltag -release %global namedversion %{version}%{?namedreltag} Name: imgscalr-lib Version: 4.2 Release: 1%{?dist} Summary: Java Image Scaling Library License: ASL 2.0 URL: http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/ Source0: https://github.com/thebuzzmedia/imgscalr/archive/%{namedversion}.tar.gz BuildRequires: maven-local BuildRequires: mvn(junit:junit) %if %{?fedora} > 20 BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) %else BuildRequires: mvn(org.sonatype.oss:oss-parent) %endif BuildArch: noarch %description Imgscalr is an very simple and efficient (hardware accelerated) “best-practices” image-scaling library implemented in pure Java 2D; Imgscalr now includes a handful of other convenience image operations, all as easy to use as re-size. This library makes uses of efficient Java 2D scaling techniques advocated by the Java 2D team which provides hardware accelerated operations on most platforms. This library also implements the optimized incremental scaling algorithm proposed by Chris Campbell with some minor enhancements for good-looking (and quick) thumbnail generation (previously only possible with the discouraged Image.getScaledInstance method using the much slower SCALE_AREA_AVERAGE algorithm). %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n imgscalr-%{namedversion} # Unwanted # jar with dependencies %pom_remove_plugin :maven-assembly-plugin # javadoc jar %pom_remove_plugin :maven-javadoc-plugin # source jar %pom_remove_plugin :maven-source-plugin # java.lang.AssertionError: expected:... but was:... rm -r src/test/java/org/imgscalr/ScalrApplyTest.java \ src/test/java/org/imgscalr/ScalrCropTest.java \ src/test/java/org/imgscalr/ScalrPadTest.java \ src/test/java/org/imgscalr/ScalrResizeTest.java \ src/test/java/org/imgscalr/ScalrRotateTest.java \ src/test/java/org/imgscalr/AllTests.java %mvn_file org.imgscalr:%{name} %{name} %build %mvn_build %install %mvn_install %files -f .mfiles %doc README %license LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Mon May 11 2015 gil cattaneo 4.2-1 - initial rpm