%global namedreltag -SNAPSHOT %global namedversion %{version}%{?namedreltag} Name: groovy-gram Version: 1.2 Release: 0.1.20160831%{?dist} Summary: A metadata processing engine for Groovy License: ASL 2.0 # no more available @ http://groovy.codehaus.org/Gram Url: https://github.com/andreyvit/groovy/tree/master/groovy/modules/gram # svn export http://svn.codehaus.org/groovy/trunk/groovy/modules/gram groovy-gram-1.2 # tar cafJ groovy-gram-1.2-20150216.tar.xz groovy-gram-1.2 # git clone https://github.com/andreyvit/groovy/ # cd groovy/groovy/modules # tar cafJ ../../../groovy-gram-1.2-20160831.tar.xz gram Source0: groovy-gram-1.2-20160831.tar.xz # customized pom file Source1: groovy-gram-1.2-pom.xml # https://github.com/andreyvit/groovy/issues/1 # groovy gram package don't include the license file Source2: http://www.apache.org/licenses/LICENSE-2.0.txt Patch0: groovy-gram-1.2-groovy2.patch BuildRequires: java-javadoc BuildRequires: maven-local BuildRequires: mvn(annogen:annogen) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.codehaus.groovy:groovy) BuildArch: noarch %description Gram is a simple xdoclet-like tool for processing doclet tags or Java annotations in source code or bytecode and auto-generating files, data or resources. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n gram # cleanup find . -name '*.jar' -delete find . -name '*.class' -delete %patch0 -p0 cp %{SOURCE1} pom.xml cp %{SOURCE2} . sed -i 's/\r//' LICENSE-2.0.txt %mvn_file : %{name} %build %mvn_build %install %mvn_install mkdir -p %{buildroot}%{_sysconfdir}/ant.d echo "annogen ant groovy %{name}" > %{buildroot}%{_sysconfdir}/ant.d/%{name} %files -f .mfiles %config(noreplace) %{_sysconfdir}/ant.d/%{name} %license LICENSE-2.0.txt %files javadoc -f .mfiles-javadoc %license LICENSE-2.0.txt %changelog * Sun Sep 13 2015 gil cattaneo 1.2-0.1.20160831 - use new git repo for generate source archive * Tue May 29 2012 gil cattaneo 1.2-0.1.20150216 - initial rpm