%global namedreltag .RELEASE %global namedversion %{version}%{?namedreltag} Name: thymeleaf Version: 2.1.4 Release: 3%{?dist} Summary: XML/XHTML/HTML5 template engine for Java # The Fedora Packaging Committee granted thymeleaf a bundling exception to carry # altered DTDs (... is fine, assuming the license allows it) # https://fedorahosted.org/fpc/ticket/516 # W3C: src/main/resources/org/thymeleaf/dtd/standard/xhtml1-frameset.dtd # src/main/resources/org/thymeleaf/dtd/standard/xhtml1-strict.dtd # src/main/resources/org/thymeleaf/dtd/standard/xhtml1-transitional.dtd # src/main/resources/org/thymeleaf/dtd/standard/xhtml-lat1.ent # src/main/resources/org/thymeleaf/dtd/standard/xhtml-symbol.ent # src/main/resources/org/thymeleaf/dtd/standard/xhtml-special.ent License: ASL 2.0 and W3C URL: http://www.thymeleaf.org/ Source0: https://github.com/thymeleaf/thymeleaf/archive/%{name}-%{namedversion}.tar.gz # from http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 Source1: W3C-license.txt # Replace ognl 3.0.8 Patch0: thymeleaf-2.1.4-commons-ognl.patch BuildRequires: maven-local BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(net.sourceforge.nekohtml:nekohtml) BuildRequires: mvn(org.apache.commons:commons-ognl) BuildRequires: mvn(org.javassist:javassist) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.unbescape:unbescape) BuildArch: noarch %description Thymeleaf is a Java library. It is an XML/XHTML/HTML5 template engine (extensible to other formats) that can work both in web and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of web applications, but it can process any XML file even in offline environments. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-%{name}-%{namedversion} find -name "*.class" -delete find -name "*.jar" -print -delete %patch0 -p1 %pom_remove_plugin :maven-gpg-plugin %pom_remove_plugin :maven-source-plugin %pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:executions" %pom_xpath_remove "pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:configuration/pom:reportOutputDirectory" %pom_xpath_set "pom:properties/pom:maven.compile.source" 1.6 %pom_xpath_set "pom:properties/pom:maven.compile.target" 1.6 # Default is US-ASCII %pom_xpath_set "pom:plugin[pom:artifactId = 'maven-compiler-plugin']/pom:configuration/pom:encoding" UTF-8 %pom_xpath_set "pom:plugin[pom:artifactId = 'maven-resources-plugin']/pom:configuration/pom:encoding" UTF-8 %pom_xpath_set "pom:dependency[pom:groupId = 'javax.servlet']/pom:version" 3.1.0 %pom_xpath_set "pom:dependency[pom:groupId = 'javax.servlet']/pom:artifactId" javax.servlet-api chmod 644 ChangeLog.txt NOTICE.txt cp -p %{SOURCE1} . sed -i 's/\r//' W3C-license.txt %mvn_file : %{name} %build %mvn_build %install %mvn_install %files -f .mfiles %doc ChangeLog.txt CONTRIBUTING.markdown README.txt RELEASING.txt USAGE.txt %license LICENSE.txt NOTICE.txt W3C-license.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt W3C-license.txt %changelog * Thu Mar 19 2015 gil cattaneo 2.1.4-3 - add W3C license * Thu Mar 19 2015 gil cattaneo 2.1.4-2 - fix license tag * Sun Mar 08 2015 gil cattaneo 2.1.4-1 - initial rpm