%global oname annotations Name: jetbrains-annotations Version: 15.0 Release: 2%{?dist} Summary: IntelliJ IDEA Annotations License: ASL 2.0 URL: http://www.jetbrains.org Source0: http://central.maven.org/maven2/org/jetbrains/annotations/%{version}/annotations-%{version}-sources.jar Source1: http://central.maven.org/maven2/org/jetbrains/annotations/%{version}/annotations-%{version}.pom Source2: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: maven-local BuildArch: noarch %description A set of annotations used for code inspection support and code documentation. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -T -q -c mkdir -p src/main/{java,resources} ( cd src/main/java %jar -xf %{SOURCE0} rm -rf META-INF ) cp -p %{SOURCE1} pom.xml %pom_remove_plugin :maven-antrun-plugin %pom_remove_plugin :maven-gpg-plugin %pom_remove_plugin :maven-javadoc-plugin %pom_remove_plugin :maven-source-plugin %pom_xpath_inject pom:properties "UTF-8" # clone source directory structure find src/main/java/ -type d | while read dirname ; do newdirname=`echo $dirname | sed "s:src/main/java:src/main/resources:g"` mkdir -p $newdirname done # copy everything except *.java sources find src/main/java/ -type f | grep -v "\.java" | while read cpfrom ; do cpto=`echo $cpfrom | sed "s:src/main/java:src/main/resources:g"` cp -p $cpfrom $cpto done cp -p %{SOURCE2} LICENSE.txt sed -i 's/\r//' LICENSE.txt %mvn_file org.jetbrains:%{oname} %{name} %mvn_alias org.jetbrains:%{oname} com.intellij: %build %mvn_build %install %mvn_install %files -f .mfiles %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Wed Apr 27 2016 gil cattaneo 15.0-2 - review fixes * Sun Mar 20 2016 gil cattaneo 15.0-1 - initial rpm