# Optionally build with a reduced dependency set
%bcond_with jp_minimal
%global oname mustache.java
Name: mustache-java
Version: 0.9.6
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
BuildRequires: maven-local
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core)
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
BuildRequires: mvn(com.google.guava:guava:20.0)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
BuildRequires: mvn(org.codehaus.plexus:plexus-compiler-api)
%if %{without jp_minimal}
BuildRequires: mvn(com.fasterxml.jackson.dataformat:jackson-dataformat-yaml)
BuildRequires: mvn(com.github.spullara.cli-parser:cli-parser)
BuildRequires: mvn(org.eclipse.jetty:jetty-server)
%endif
BuildArch: noarch
# Obsoletes added in F30
# Benchmarks are not really useful for users, so don't bother shipping them
Obsoletes: %{name}-benchmarks < %{version}-%{release}
%description
Implementation of the Mustache language in Java.
Mustache.java is a derivative of mustache.js.
%package maven-plugin
Summary: Mustache 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 API documentation for %{name}.
%prep
%setup -q -n %{oname}-%{oname}-%{version}
%pom_disable_module scala-extensions
%pom_disable_module benchmarks
# Not needed for RPM builds
%pom_remove_plugin :maven-assembly-plugin handlebar
%pom_remove_plugin :maven-assembly-plugin compiler
%if %{with jp_minimal}
# Build without cli/webserver support
%pom_remove_dep "org.eclipse.jetty:" handlebar
%pom_remove_dep "com.github.spullara.cli-parser:" handlebar
rm handlebar/src/main/java/com/sampullara/mustache/Handlebar.java
# Build without yaml tests
%pom_remove_dep ":jackson-dataformat-yaml" compiler
rm compiler/src/test/java/com/github/mustachejava/{SpecTest.java,simple/SimpleSpecTest.java}
%else
# Fix manifest entries for cli/webserver support
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin handlebar "
false
com.sampullara.mustache.Handlebar
"
%endif
%mvn_package com.github.spullara.mustache.java:mustache-maven-plugin maven-plugin
%mvn_package com.github.spullara.mustache.java:compiler::tests:
%build
# Test fails at random on ARM builder
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8 -Dmaven.test.failure.ignore=true
%install
%mvn_install
%files -f .mfiles
%doc README.md
%license LICENSE
%files maven-plugin -f .mfiles-maven-plugin
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Wed Feb 20 2019 Mat Booth - 0.9.6-1
- Update to latest upstream version
- Drop upstreamed patch
- Obsolete the benchmark module
- Add conditional minimal dependency build
* Fri Feb 01 2019 Fedora Release Engineering - 0.9.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering - 0.9.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering - 0.9.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering - 0.9.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering - 0.9.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Dec 06 2016 Mat Booth - 0.9.4-1
- Update to latest upstream release
- Add patch to port all modules to jackson 2
- Re-generate BRs
* Fri Jun 03 2016 Michael Simacek - 0.9.1-3
- Fix build with current maven-jar-plugin
* Thu Feb 04 2016 Fedora Release Engineering - 0.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Oct 23 2015 gil cattaneo 0.9.1-1
- update to 0.9.1
* Wed Jun 17 2015 Fedora Release Engineering - 0.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Feb 23 2015 gil cattaneo 0.9.0-1
- update to 0.9.0
* Tue Feb 10 2015 gil cattaneo 0.8.16-2
- introduce license macro
* 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