Name: gherkin2-java Version: 2.12.2 Release: 2%{?dist} Summary: Pure Java Gherkin language # Source files without license headers https://github.com/cucumber/gherkin2/issues/348 License: MIT # Newer release available @ https://github.com/cucumber/gherkin-java URL: https://github.com/cucumber/gherkin2 Source0: https://github.com/cucumber/gherkin2/archive/v%{version}.tar.gz BuildRequires: maven-local BuildRequires: mvn(com.google.code.gson:gson) BuildRequires: mvn(junit:junit) BuildRequires: mvn(net.iharder:base64) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.mockito:mockito-all) BuildArch: noarch %description A fast lexer and parser for the Gherkin language based on Ragel. Gherkin is two things: ° The language that has evolved out of the Cucumber project. ° This library. Supported platforms: ° Pure Java %package javadoc Summary: Javadoc for Gherkin Java %description javadoc This package contains javadoc for Gherkin Java. %prep %setup -q -n gherkin2-%{version} # Cleanup find . -name "*.class" -print -delete find . -name "*.jar" -print -delete find . -name "*.dll" -print -delete find . -name "*.exe" -print -delete find . -name "*.rb" -print -delete rm -r ikvm js tasks *.sh # Unwanted tasks %pom_remove_plugin :maven-gpg-plugin java %pom_remove_plugin :maven-site-plugin java %pom_remove_plugin :maven-source-plugin java # org.apache.maven.wagon:wagon-ssh:2.3 %pom_xpath_remove pom:build/pom:extensions java # Disable shaded libraries* %pom_remove_plugin :maven-shade-plugin java # Disable repackage Gherkin jar (use org.jruby:jruby-complete:1.7.2) %pom_remove_plugin :maven-antrun-plugin java # Use system libraries* %pom_remove_dep info.cukes:gherkin-jvm-deps java %pom_add_dep com.google.code.gson:gson java %pom_add_dep net.iharder:base64 java find ./ -name "*.java" -exec sed -i "s/gherkin.deps.//g" {} + # Newer release have different gId %mvn_file info.cukes:gherkin gherkin2 %build %mvn_build -- -f java/pom.xml %install %mvn_install %jpackage_script gherkin.Main "" "" gherkin2:google-gson:base64 gherkin2 true %files -f .mfiles %{_bindir}/* %doc History.md README.md %license LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Sun May 15 2016 gil cattaneo 2.12.2-2 - review fixes * Wed Mar 18 2015 gil cattaneo 2.12.2-1 - initial rpm