%global githash 15f2caa7734da86fff7b077488f8a1c9ad0a5b96 %global shorthash %(c=%{githash}; echo ${c:0:7}) Name: fmpp-maven-plugin Version: 1.0.1 Release: 0.1.git%{shorthash}%{?dist} Summary: Maven Plugin front end for FMPP License: MIT URL: https://github.com/adityakishore/freemarkerpp-maven-plugin/ Source0: https://github.com/adityakishore/freemarkerpp-maven-plugin/archive/%{githash}/%{name}-%{githash}.tar.gz BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(net.sourceforge.fmpp:fmpp) BuildRequires: mvn(org.apache.maven:maven-compat) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven.plugin-testing:maven-plugin-testing-harness) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildArch: noarch %description This is a Maven Plugin front end for the FreeMarker text file PreProcessor. The plugin provides functionality for generating code, test code, resources and test resources for a maven project. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n freemarkerpp-maven-plugin-%{githash} rm -r site # Unneeded tasks %pom_remove_plugin :maven-gpg-plugin %{name} %pom_remove_plugin :maven-javadoc-plugin %{name} %pom_remove_plugin :maven-source-plugin %{name} # Use maven3 apis only %pom_change_dep org.apache.maven: ::3.3.3 %{name} %pom_change_dep :maven-project :maven-core %{name} # Resolve ComponentLookupException with org.apache.maven.repository.RepositorySystem %pom_add_dep org.apache.maven:maven-compat:3.3.3:test %{name} %mvn_file :%{name} %{name} %build %mvn_build -- -f %{name}/pom.xml %install %mvn_install %files -f .mfiles %license %{name}/LICENSE.txt %files javadoc -f .mfiles-javadoc %license %{name}/LICENSE.txt %changelog * Sun Apr 03 2016 gil cattaneo 1.0.1-0.1.git15f2caa - initial rpm