%global oname mustache.java Name: mustache-java Version: 0.8.16 Release: 1%{?dist} Summary: Implementation of mustache.js for Java License: ASL 2.0 URL: https://github.com/spullara/mustache.java/ Source0: https://github.com/spullara/mustache.java/archive/%{oname}-%{version}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=1026522 BuildRequires: mvn(com.github.spullara.cli-parser:cli-parser) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(org.codehaus.jackson:jackson-mapper-asl) BuildRequires: mvn(org.eclipse.jetty:jetty-server) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) BuildRequires: mvn(org.codehaus.plexus:plexus-compiler-api) %if %{?fedora} > 19 BuildRequires: mvn(org.jruby:jruby) %else BuildRequires: mvn(org.jruby:shared) %endif BuildRequires: mvn(org.ow2.asm:asm-commons) BuildRequires: mvn(org.ow2.asm:asm-util) %if 0 BuildRequires: mvn(com.twitter:util-core:4.0.0) BuildRequires: mvn(org.scala-lang:scala-library:2.8.1) BuildRequires: mvn(org.scala-tools:maven-scala-plugin:2.14.1) # Test deps BuildRequires: mvn(com.github.jnr:jnr-posix) %endif BuildRequires: mvn(junit:junit) BuildRequires: maven-local BuildRequires: maven-plugin-bundle BuildRequires: maven-plugin-plugin BuildArch: noarch %description Implementation of the Mustache language in Java. Mustache.java is a derivative of mustache.js. %package maven-plugin Summary: %{name} Maven Mojo %description maven-plugin A maven plugin to process mustache templates in a maven build. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{oname}-%{oname}-%{version} find . -name "*.class" -print -delete find . -name "*.jar" -print -delete %pom_remove_plugin :maven-assembly-plugin compiler %pom_remove_plugin org.scala-tools:maven-scala-plugin compiler %pom_remove_dep org.scala-lang:scala-library compiler %pom_remove_dep com.twitter:util-core compiler %pom_remove_plugin :maven-assembly-plugin handlebar # Fix manifest entries %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin handlebar " false com.sampullara.mustache.Handlebar " # TODO Fix jruby aId %if %{?fedora} <= 19 %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.jruby']/pom:artifactId" shared compiler %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.jruby']/pom:artifactId" shared codegen %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.jruby']/pom:artifactId" shared indy %endif # These tests fails for various reasons rm -r compiler/src/test/java/com/github/mustachejava/SpecTest.java \ compiler/src/test/java/com/github/mustachejava/simple/SimpleSpecTest.java \ codegen/src/test/java/com/github/mustachejava/CodegenSpecTest.java \ indy/src/test/java/com/github/mustachejava/IndySpecTest.java # jruby or its deps seem broken # NoClassDefFound jnr/posix/JavaSecured #%%pom_add_dep com.github.jnr:jnr-posix:2.4.0:test compiler # NoClassDefFoundError: org/jruby/common/RubyWarnings at org.jruby.Ruby.(Ruby.java:4474) (now provides org/jruby/common/IRubyWarnings ) rm -r compiler/src/test/java/com/github/mustachejava/JRubyTest.java \ compiler/src/test/java/com/github/mustachejavabenchmarks/JRubyBenchmarkTest.java %build %mvn_package com.github.spullara.mustache.java:mustache-maven-plugin maven-plugin %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install install -pm 644 compiler/target/compiler-%{version}-tests.jar %{buildroot}%{_javadir}/%{name}/compiler-tests.jar %files -f .mfiles %dir %{_javadir}/%{name} %{_javadir}/%{name}/compiler-tests.jar %doc LICENSE README.md %files maven-plugin -f .mfiles-maven-plugin %doc LICENSE %files javadoc -f .mfiles-javadoc %doc LICENSE %changelog * Thu Sep 04 2014 gil cattaneo 0.8.16-1 - update to 0.8.16 * Sun Nov 03 2013 gil cattaneo 0.8.12.1-1 - initial rpm