diff --git a/velocity-1.7-doclint.patch b/velocity-1.7-doclint.patch new file mode 100644 index 0000000..7895b60 --- /dev/null +++ b/velocity-1.7-doclint.patch @@ -0,0 +1,11 @@ +diff -Nru velocity-1.7/build/build.xml velocity-1.7.doclint/build/build.xml +--- velocity-1.7/build/build.xml 2015-07-22 12:13:51.566920750 +0200 ++++ velocity-1.7.doclint/build/build.xml 2015-07-22 12:13:14.929703544 +0200 +@@ -592,6 +592,7 @@ + doctitle="${name} ${version} API" + encoding="UTF-8" + docencoding="UTF-8" ++ additionalparam="-Xdoclint:none" + bottom="Copyright © 2000-${build.year} <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved."> + + diff --git a/velocity-1.7-osgi.patch b/velocity-1.7-osgi.patch new file mode 100644 index 0000000..2d6ac05 --- /dev/null +++ b/velocity-1.7-osgi.patch @@ -0,0 +1,43 @@ +diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.properties +--- velocity-1.7/build/build.properties 2010-11-19 21:16:21.000000000 +0100 ++++ velocity-1.7.osgi/build/build.properties 2015-07-22 12:21:19.627117810 +0200 +@@ -166,8 +166,7 @@ + + ######################################################################## + # OSGi stuff +-import=com.werken.xpath;resolution:=optional,\ +- javax.naming,\ ++import=javax.naming,\ + javax.servlet;resolution:=optional,\ + javax.servlet.http;resolution:=optional,\ + javax.sql,\ +@@ -188,8 +187,7 @@ + org.jdom.input;resolution:=optional,\ + org.jdom.output;resolution:=optional,\ + org.xml.sax +-dep.import=com.werken.xpath;resolution:=optional,\ +- javax.naming,\ ++dep.import=javax.naming,\ + javax.servlet;resolution:=optional,\ + javax.servlet.http;resolution:=optional,\ + javax.sql,\ +@@ -207,8 +205,7 @@ + export=org.apache.velocity;uses:="org.apache.velocity.context,\ + org.apache.velocity.exception,\ + org.apache.velocity.runtime.resource",\ +- org.apache.velocity.anakia;uses:="com.werken.xpath,\ +- org.apache.tools.ant,\ ++ org.apache.velocity.anakia;uses:="org.apache.tools.ant,\ + org.apache.tools.ant.taskdefs,\ + org.jdom,\ + org.jdom.output",\ +@@ -327,8 +324,7 @@ + org.apache.velocity;uses:="org.apache.velocity.context,\ + org.apache.velocity.exception,\ + org.apache.velocity.runtime.resource",\ +- org.apache.velocity.anakia;uses:="com.werken.xpath,\ +- org.apache.tools.ant,\ ++ org.apache.velocity.anakia;uses:="org.apache.tools.ant,\ + org.apache.tools.ant.taskdefs,\ + org.jdom,\ + org.jdom.output",\ diff --git a/velocity.spec b/velocity.spec index 123687b..db0b874 100644 --- a/velocity.spec +++ b/velocity.spec @@ -1,6 +1,6 @@ Name: velocity Version: 1.7 -Release: 17%{?dist} +Release: 18%{?dist} Epoch: 0 Summary: Java-based template engine License: ASL 2.0 @@ -16,12 +16,14 @@ Patch2: 0003-Use-system-jars.patch Patch3: 0004-JDBC-41-compat.patch Patch4: 0001-Don-t-use-Werken-XPath.patch Patch5: 0006-Skip-Java-8-incompatible-test.patch +Patch6: velocity-1.7-doclint.patch +Patch7: velocity-1.7-osgi.patch BuildRequires: javapackages-local BuildRequires: ant BuildRequires: antlr BuildRequires: junit -BuildRequires: ant-junit +BuildRequires: ant-junit BuildRequires: hsqldb-lib BuildRequires: apache-commons-collections BuildRequires: apache-commons-logging @@ -31,11 +33,11 @@ BuildRequires: jakarta-oro BuildRequires: jaxen BuildRequires: jdom BuildRequires: bcel -BuildRequires: log4j +BuildRequires: log4j12 BuildRequires: apache-parent # It fails one of the arithmetic test cases with gcj -BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel >= 1:1.6.0 %description Velocity is a Java-based template engine. It permits anyone to use the @@ -83,7 +85,8 @@ Demonstrations and samples for %{name}. %setup -q # remove bundled libs/classes (except those used for testing) -find . -name '*.jar' -o -name '*.class' -not -path '*test*' -print -delete +find . -name '*.jar' ! -name 'test*.jar' -print -delete +find . -name '*.class' ! -name 'Foo.class' -print -delete # Remove dependency on avalon-logkit rm -f src/java/org/apache/velocity/runtime/log/AvalonLogChute.java @@ -116,9 +119,16 @@ cp %{SOURCE1} ./pom.xml # Skip Java 8 incompatible test %patch5 -p1 +# Disable Java8 doclint +%patch6 -p1 + +# Remove werken-xpath Import/Export refences in OSGi manifest file +%patch7 -p1 + # ----------------------------------------------------------------------------- %build + export CLASSPATH=$(build-classpath \ antlr \ apache-commons-collections \ @@ -136,6 +146,8 @@ junit) ant \ -buildfile build/build.xml \ -Dbuild.sysclasspath=first \ + -Djavac.target=1.6 \ + -Djavac.source=1.6 \ jar javadocs test # fix line-endings in generated files @@ -149,26 +161,39 @@ sed -i 's/\r//' docs/api/stylesheet.css docs/api/package-list %mvn_artifact pom.xml bin/%{name}-%{version}.jar %mvn_install -J docs/api +# zero-length file +rm -r test/issues/velocity-537/compare/velocity537.vm.cmp # data install -d -m 755 %{buildroot}%{_datadir}/%{name} cp -pr examples test %{buildroot}%{_datadir}/%{name} %files -f .mfiles -%doc LICENSE NOTICE README.txt +%doc README.txt +%license LICENSE NOTICE %files manual -%doc LICENSE NOTICE +%license LICENSE NOTICE %doc docs/* %files javadoc -f .mfiles-javadoc -%doc LICENSE NOTICE +%license LICENSE NOTICE %files demo -%doc LICENSE NOTICE +%license LICENSE NOTICE %{_datadir}/%{name} %changelog +* Wed Jul 22 2015 gil cattaneo 0:1.7-18 +- fix FTBFS rhbz#1240035 +- fix BR list, change log4j with log4j12 +- set javac source/target to 1.6 +- disable Java8doc doclint +- remove werken-xpath Import/Export refences in manifest file +- resolve some rpmlint problems +- remove zero-length file +- introduce license macro + * Fri Jun 19 2015 Fedora Release Engineering - 0:1.7-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild