%global namedreltag .RELEASE %global namedversion %{version}%{?namedreltag} Name: thymeleaf-extras-tiles2 Version: 2.1.1 Release: 1%{?dist} Summary: Thymeleaf integration with Apache Tiles 2.x License: ASL 2.0 URL: http://www.thymeleaf.org/ Source0: https://github.com/thymeleaf/thymeleaf-extras-tiles2/archive/%{name}-%{namedversion}.tar.gz Source1: thymeleaf-extras-tiles2-root-template-pom.xml BuildRequires: maven-local BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(javax.servlet.jsp:jsp-api) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.tiles:tiles-core) BuildRequires: mvn(org.apache.tiles:tiles-jsp) BuildRequires: mvn(org.apache.tiles:tiles-servlet) BuildRequires: mvn(org.apache.tiles:tiles-template) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.springframework:spring-beans) BuildRequires: mvn(org.springframework:spring-context) BuildRequires: mvn(org.springframework:spring-core) BuildRequires: mvn(org.springframework:spring-web) BuildRequires: mvn(org.springframework:spring-webmvc) BuildRequires: mvn(org.springframework.webflow:spring-js) BuildRequires: mvn(org.springframework.webflow:spring-webflow) BuildRequires: mvn(org.thymeleaf:thymeleaf) BuildRequires: mvn(org.thymeleaf:thymeleaf-spring3) BuildArch: noarch %description Thymeleaf integration with Apache Tiles 2.x. %package spring3 Summary: Thymeleaf Tiles2 integration with Spring Framework 3.x %description spring3 Thymeleaf integration with Apache Tiles 2.x and Spring Framework 3.x. %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 for p in %{name} thymeleaf-extras-tiles2-spring3 ;do ( cd ${p} %pom_remove_plugin :maven-gpg-plugin %pom_remove_plugin :maven-source-plugin %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:executions" %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-javadoc-plugin']/pom:configuration/pom:reportOutputDirectory" %pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-resources-plugin']/pom:configuration/pom:encoding" UTF-8 %pom_xpath_set "pom:properties/pom:project.build.sourceEncoding" UTF-8 %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.servlet']/pom:version" 3.1.0 %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'javax.servlet']/pom:artifactId" javax.servlet-api ) done cp -p %{SOURCE1} pom.xml sed -i "s|@VERSION@|%{namedversion}|" pom.xml %pom_disable_module thymeleaf-extras-tiles2-dist %pom_disable_module thymeleaf-extras-tiles2-spring4 %pom_xpath_set "pom:project/pom:version" %{namedversion} thymeleaf-extras-tiles2-spring3 chmod 644 README.markdown %{name}/LICENSE.txt %{name}/NOTICE.txt cp -p %{name}/LICENSE.txt . cp -p %{name}/NOTICE.txt . %mvn_package :%{name}-root __noinstall %mvn_file :%{name} %{name} %mvn_file :%{name}-spring3 %{name}-spring3 %build %mvn_build -s %install %mvn_install %files -f .mfiles-%{name} %doc CONTRIBUTING.markdown ChangeLog.txt README.markdown %license LICENSE.txt NOTICE.txt %files spring3 -f .mfiles-%{name}-spring3 %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog * Fri Mar 20 2015 gil cattaneo 2.1.1-1 - initial rpm