%global commit 52822d7ebd20e8e532fdceb2f32ed6d068606594
%global shortcommit %(c=%{commit}; echo ${c:0:12})
Name: spi
Version: 0.2.7
Release: 0.1.SNAPSHOT%{?dist}
Summary: Simplifies usage of Java Service Provider Interface
License: ASL 2.0
URL: https://code.google.com/p/spi/
Source0: https://spi.googlecode.com/archive/%{commit}.tar.gz
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildArch: noarch
%description
This project allows the programmer to use an Annotation, @ProviderFor,
to flag a class as an implementation of a certain interface. During
compilation, the necessary files are created at the appropriate locations.
Also, the class is inspected to see if it follows all rules applicable to
Service Providers. Compile time errors will be generated if those rules
are broken, assisting the programmer to create more robust code.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{shortcommit}
find . -name "*.class" -delete
find . -name "*.jar" -delete
cp -p %{SOURCE1} LICENSE
sed -i 's/\r//' LICENSE
cd org.mangosdk.spi
%pom_remove_plugin :maven-eclipse-plugin
# Add OSGi manifest
%pom_xpath_set "pom:project/pom:packaging" bundle
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 . '
true
bundle-manifest
process-classes
manifest
'
%mvn_file org.mangosdk.%{name}:%{name} %{name}
%mvn_package org.mangosdk.%{name}:%{name}::tests:
%build
cd org.mangosdk.spi
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
%install
cd org.mangosdk.spi
%mvn_install
%files -f org.mangosdk.spi/.mfiles
%license LICENSE
%files javadoc -f org.mangosdk.spi/.mfiles-javadoc
%license LICENSE
%changelog
* Sat Jun 06 2015 gil cattaneo 0.2.7-0.1.SNAPSHOT
- update to 0.2.7-SNAPSHOT
* Tue Mar 03 2015 gil cattaneo 0.2.4-1
- initial rpm