%global commit 1d4c4717ec5c73aac9fd7a1f7fbfbb879105b6e1 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: jai-imageio-core-standalone Version: 1.2 Release: 0.1.pre.dr.b04.2013.04.23%{?dist} Summary: Java Advanced Imaging Image I/O Tools API core (standalone) License: BSD URL: https://github.com/stain/jai-imageio-core Source0: https://github.com/stain/jai-imageio-core/archive/%{commit}/jai-imageio-%{commit}.tar.gz Patch0: %{name}-1.2-no-sun-classes.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildArch: noarch %description Java Advanced Imaging Image I/O Tools API core, but without the classes involved with javax.media.jai dependencies and codecLibJIIO, meaning that this library can be distributed under the modified BSD license and should be GPL compatible. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n jai-imageio-core-%{commit} # remove use of sun.* %patch0 -p1 %pom_remove_plugin :maven-source-plugin %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:executions" # remove customized/bundled jj2000 library refs rm -r src/main/java/jj2000 \ src/main/java/com/sun/media/imageio/plugins/jpeg2000 \ src/main/java/com/sun/media/imageioimpl/plugins/jpeg2000 sed -i '/jpeg2000/d' src/main/resources/META-INF/services/* %build %mvn_file :%{name} %{name} %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles %doc COPYRIGHT.txt LICENSE.txt README.md %files javadoc -f .mfiles-javadoc %doc COPYRIGHT.txt LICENSE.txt %changelog * Mon May 05 2014 gil cattaneo 1.2-0.1.pre.dr.b04.2013.04.23 - initial rpm