2009-07-21 05:05:23 +02:00
|
|
|
#
|
2012-12-19 13:35:05 +01:00
|
|
|
# spec file for package velocity
|
2009-07-21 05:05:23 +02:00
|
|
|
#
|
2024-02-25 21:26:53 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2009-07-21 05:05:23 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-05 23:15:54 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-07-21 05:05:23 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: velocity
|
2014-12-07 15:39:01 +01:00
|
|
|
Version: 1.7
|
2012-12-19 13:35:05 +01:00
|
|
|
Release: 0
|
2009-07-21 05:05:23 +02:00
|
|
|
Summary: Java-based template engine
|
2011-12-06 19:11:38 +01:00
|
|
|
License: Apache-2.0
|
2012-12-19 13:35:05 +01:00
|
|
|
Group: Development/Libraries/Java
|
2022-03-22 16:14:08 +01:00
|
|
|
URL: https://velocity.apache.org/
|
|
|
|
Source0: https://archive.apache.org/dist/velocity/engine/%{version}/%{name}-%{version}.tar.gz
|
2014-12-08 13:32:44 +01:00
|
|
|
Source1: %{name}-%{version}.pom
|
2009-07-21 05:05:23 +02:00
|
|
|
Patch0: velocity-build_xml.patch
|
2021-03-12 09:23:30 +01:00
|
|
|
Patch1: velocity-1.7-CVE-2020-13936.patch
|
2023-09-27 01:14:14 +02:00
|
|
|
Patch2: velocity-1.7-commons-lang3.patch
|
|
|
|
Patch3: velocity-1.7-log-chute.patch
|
|
|
|
BuildRequires: ant
|
2012-12-19 13:35:05 +01:00
|
|
|
BuildRequires: commons-collections
|
2023-09-27 01:14:14 +02:00
|
|
|
BuildRequires: commons-lang3
|
2017-05-19 18:40:17 +02:00
|
|
|
BuildRequires: fdupes
|
2022-03-22 16:14:08 +01:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2023-09-27 01:14:14 +02:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2017-05-19 18:40:17 +02:00
|
|
|
BuildArch: noarch
|
2009-07-21 05:05:23 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Velocity is a Java-based template engine. It permits anyone to use the
|
|
|
|
simple yet powerful template language to reference objects defined in
|
|
|
|
Java code.
|
|
|
|
When Velocity is used for web development, Web designers can work in
|
|
|
|
parallel with Java programmers to develop web sites according to the
|
|
|
|
Model-View-Controller (MVC) model, meaning that web page designers can
|
|
|
|
focus solely on creating a site that looks good, and programmers can
|
|
|
|
focus solely on writing top-notch code. Velocity separates Java code
|
|
|
|
from the web pages, making the web site more maintainable over the long
|
|
|
|
run and providing a viable alternative to Java Server Pages (JSPs) or
|
|
|
|
PHP.
|
|
|
|
Velocity's capabilities reach well beyond the realm of web sites; for
|
|
|
|
example, it can generate SQL and PostScript and XML (see Anakia for more
|
|
|
|
information on XML transformations) from templates. It can be used
|
|
|
|
either as a standalone utility for generating source code and reports,
|
|
|
|
or as an integrated component of other systems. Velocity also provides
|
|
|
|
template services for the Turbine web application framework.
|
|
|
|
Velocity+Turbine provides a template service that will allow web
|
|
|
|
applications to be developed according to a true MVC model.
|
|
|
|
|
|
|
|
%package manual
|
|
|
|
Summary: Manual for %{name}
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
Velocity is a Java-based template engine. It permits anyone to use the
|
|
|
|
simple yet powerful template language to reference objects defined in
|
|
|
|
Java code.
|
|
|
|
When Velocity is used for web development, Web designers can work in
|
|
|
|
parallel with Java programmers to develop web sites according to the
|
|
|
|
Model-View-Controller (MVC) model, meaning that web page designers can
|
|
|
|
focus solely on creating a site that looks good, and programmers can
|
|
|
|
focus solely on writing top-notch code. Velocity separates Java code
|
|
|
|
from the web pages, making the web site more maintainable over the long
|
|
|
|
run and providing a viable alternative to Java Server Pages (JSPs) or
|
|
|
|
PHP.
|
|
|
|
Velocity's capabilities reach well beyond the realm of web sites; for
|
|
|
|
example, it can generate SQL and PostScript and XML (see Anakia for more
|
|
|
|
information on XML transformations) from templates. It can be used
|
|
|
|
either as a standalone utility for generating source code and reports,
|
|
|
|
or as an integrated component of other systems. Velocity also provides
|
|
|
|
template services for the Turbine web application framework.
|
|
|
|
Velocity+Turbine provides a template service that will allow web
|
|
|
|
applications to be developed according to a true MVC model.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2012-12-19 13:35:05 +01:00
|
|
|
Group: Documentation/HTML
|
2009-07-21 05:05:23 +02:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Velocity is a Java-based template engine. It permits anyone to use the
|
|
|
|
simple yet powerful template language to reference objects defined in
|
|
|
|
Java code.
|
|
|
|
When Velocity is used for web development, Web designers can work in
|
|
|
|
parallel with Java programmers to develop web sites according to the
|
|
|
|
Model-View-Controller (MVC) model, meaning that web page designers can
|
|
|
|
focus solely on creating a site that looks good, and programmers can
|
|
|
|
focus solely on writing top-notch code. Velocity separates Java code
|
|
|
|
from the web pages, making the web site more maintainable over the long
|
|
|
|
run and providing a viable alternative to Java Server Pages (JSPs) or
|
|
|
|
PHP.
|
|
|
|
Velocity's capabilities reach well beyond the realm of web sites; for
|
|
|
|
example, it can generate SQL and PostScript and XML (see Anakia for more
|
|
|
|
information on XML transformations) from templates. It can be used
|
|
|
|
either as a standalone utility for generating source code and reports,
|
|
|
|
or as an integrated component of other systems. Velocity also provides
|
|
|
|
template services for the Turbine web application framework.
|
|
|
|
Velocity+Turbine provides a template service that will allow web
|
|
|
|
applications to be developed according to a true MVC model.
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Demo for %{name}
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description demo
|
|
|
|
Velocity is a Java-based template engine. It permits anyone to use the
|
|
|
|
simple yet powerful template language to reference objects defined in
|
|
|
|
Java code.
|
|
|
|
When Velocity is used for web development, Web designers can work in
|
|
|
|
parallel with Java programmers to develop web sites according to the
|
|
|
|
Model-View-Controller (MVC) model, meaning that web page designers can
|
|
|
|
focus solely on creating a site that looks good, and programmers can
|
|
|
|
focus solely on writing top-notch code. Velocity separates Java code
|
|
|
|
from the web pages, making the web site more maintainable over the long
|
|
|
|
run and providing a viable alternative to Java Server Pages (JSPs) or
|
|
|
|
PHP.
|
|
|
|
Velocity's capabilities reach well beyond the realm of web sites; for
|
|
|
|
example, it can generate SQL and PostScript and XML (see Anakia for more
|
|
|
|
information on XML transformations) from templates. It can be used
|
|
|
|
either as a standalone utility for generating source code and reports,
|
|
|
|
or as an integrated component of other systems. Velocity also provides
|
|
|
|
template services for the Turbine web application framework.
|
|
|
|
Velocity+Turbine provides a template service that will allow web
|
|
|
|
applications to be developed according to a true MVC model.
|
|
|
|
|
|
|
|
%prep
|
2017-05-19 18:40:17 +02:00
|
|
|
%setup -q
|
2023-09-27 01:14:14 +02:00
|
|
|
cp %{SOURCE1} pom.xml
|
2024-05-16 16:31:37 +02:00
|
|
|
%patch -P 0 -b .sav0
|
|
|
|
%patch -P 1 -p1
|
2024-02-25 21:26:53 +01:00
|
|
|
|
|
|
|
# Use apache-commons-lang3
|
|
|
|
%pom_change_dep commons-lang:commons-lang org.apache.commons:commons-lang3:3.9
|
2024-05-16 16:31:37 +02:00
|
|
|
%patch -P 2 -p1
|
2024-02-25 21:26:53 +01:00
|
|
|
|
2024-05-16 16:31:37 +02:00
|
|
|
%patch -P 3 -p1
|
2023-09-27 01:14:14 +02:00
|
|
|
|
|
|
|
find . -name '*.jar' -print -delete
|
|
|
|
find . -name '*.class' -print -delete
|
|
|
|
|
|
|
|
# Disable unneeded features
|
|
|
|
rm -r src/java/org/apache/velocity/{anakia,texen,servlet,convert}
|
|
|
|
rm src/java/org/apache/velocity/runtime/log/{Avalon,Log4J}Log{Chute,System}.java
|
|
|
|
rm src/java/org/apache/velocity/runtime/log/{CommonsLog,Servlet}LogChute.java
|
|
|
|
rm src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java
|
|
|
|
rm src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
|
|
|
|
rm src/java/org/apache/velocity/app/event/implement/Escape{Html,JavaScript,Sql,Xml,}Reference.java
|
|
|
|
|
|
|
|
%pom_remove_dep :oro
|
|
|
|
%pom_remove_dep :jdom
|
|
|
|
%pom_remove_dep :commons-logging
|
|
|
|
%pom_remove_dep :log4j
|
|
|
|
%pom_remove_dep :servlet-api
|
|
|
|
%pom_remove_dep :logkit
|
|
|
|
%pom_remove_dep :ant
|
|
|
|
%pom_remove_dep :werken-xpath
|
2019-04-08 13:40:03 +02:00
|
|
|
|
2009-07-21 05:05:23 +02:00
|
|
|
%build
|
|
|
|
mkdir -p bin/lib
|
2023-09-27 01:14:14 +02:00
|
|
|
build-jar-repository -s -p bin/lib commons-collections commons-lang3
|
|
|
|
|
|
|
|
export CLASSPATH=$(build-classpath commons-collections commons-lang3)
|
|
|
|
|
2009-07-21 05:05:23 +02:00
|
|
|
ant \
|
2024-02-25 21:26:53 +01:00
|
|
|
-Djavac.source=1.8 -Djavac.target=1.8 -Djavac.release=8 \
|
2009-07-21 05:05:23 +02:00
|
|
|
-buildfile build/build.xml \
|
2019-02-07 17:18:29 +01:00
|
|
|
jar javadocs
|
2009-07-21 05:05:23 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
2017-05-19 18:40:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
|
|
|
install -p -m 644 bin/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2009-07-21 05:05:23 +02:00
|
|
|
# pom
|
2017-05-19 18:40:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2023-09-27 01:14:14 +02:00
|
|
|
%{mvn_install_pom} pom.xml \
|
2017-05-19 18:40:17 +02:00
|
|
|
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
2018-11-05 23:15:54 +01:00
|
|
|
%add_maven_depmap -a velocity:velocity
|
2013-09-11 10:47:47 +02:00
|
|
|
|
2009-07-21 05:05:23 +02:00
|
|
|
# javadoc
|
2017-05-19 18:40:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}
|
2019-02-07 17:18:29 +01:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
2009-07-21 05:05:23 +02:00
|
|
|
rm -rf docs/api
|
2019-02-07 17:18:29 +01:00
|
|
|
|
|
|
|
# zero-length file
|
|
|
|
rm -r test/issues/velocity-537/compare/velocity537.vm.cmp
|
2009-07-21 05:05:23 +02:00
|
|
|
# data
|
2017-05-19 18:40:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr examples test %{buildroot}%{_datadir}/%{name}
|
2019-02-07 17:18:29 +01:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
2009-07-21 05:05:23 +02:00
|
|
|
|
2019-02-07 17:18:29 +01:00
|
|
|
%files -f .mfiles
|
|
|
|
%license LICENSE NOTICE
|
|
|
|
%doc README.txt
|
2009-07-21 05:05:23 +02:00
|
|
|
|
|
|
|
%files manual
|
|
|
|
%doc docs/*
|
|
|
|
|
|
|
|
%files javadoc
|
2013-09-11 10:47:47 +02:00
|
|
|
%{_javadocdir}/%{name}
|
2009-07-21 05:05:23 +02:00
|
|
|
|
|
|
|
%files demo
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|