%global oname jsr107spec Name: cache-api Version: 0.10 Release: 1%{?dist} Summary: JSR107 - Java Temporary Caching API License: ASL 2.0 and (CDDL or GPLv2 with exceptions) URL: https://github.com/jsr107 Source0: https://github.com/jsr107/%{oname}/archive/v%{version}.tar.gz # cache-api package don't include the license file # reported @ https://github.com/jsr107/jsr107spec/issues/242 # wget -O CDDL+GPL-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt Source1: CDDL+GPL-LICENSE.txt Source2: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: java-devel BuildRequires: mvn(org.sonatype.oss:oss-parent) %if %{?fedora} > 19 BuildRequires: mvn(javax.enterprise:cdi-api:1) %else BuildRequires: mvn(javax.enterprise:cdi-api) %endif BuildRequires: mvn(javax.transaction:jta) BuildRequires: mvn(junit:junit) BuildRequires: maven-local BuildRequires: maven-plugin-bundle BuildArch: noarch %description JCache is the API being defined in JSR107. It defines a standard Java Caching API for use by developers and a standard SPI ("Service Provider Interface") for use by implementers. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{oname}-%{version} %pom_remove_plugin :findbugs-maven-plugin # Unwanted %pom_remove_plugin :maven-source-plugin %pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions" %if %{?fedora} > 19 %pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:artifactId = 'cdi-api' ]/pom:version" 1 %endif cp -p %{SOURCE1} LICENSE.txt cp -p %{SOURCE2} . sed -i 's/\r//' LICENSE.txt LICENSE-2.0.txt %build %mvn_file : %{name} %mvn_build %install %mvn_install %files -f .mfiles %doc LICENSE.txt LICENSE-2.0.txt %files javadoc -f .mfiles-javadoc %doc LICENSE.txt LICENSE-2.0.txt %changelog * Thu Sep 19 2013 gil cattaneo 0.10-1 - initial rpm