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
|
|
|
#
|
2014-06-27 16:17:44 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2014-12-07 15:39:01 +01:00
|
|
|
Source0: http://www.apache.org/dist/velocity/engine/1.7/%{name}-%{version}.tar.gz
|
|
|
|
Source1: http://repo1.maven.org/maven2/velocity/velocity/1.7/%{name}-%{version}.pom
|
2009-07-21 05:05:23 +02:00
|
|
|
Patch0: velocity-build_xml.patch
|
|
|
|
Url: http://velocity.apache.org/
|
2012-12-19 13:35:05 +01:00
|
|
|
Requires: avalon-logkit
|
|
|
|
Requires: commons-collections
|
|
|
|
Requires: commons-lang
|
2009-07-21 05:05:23 +02:00
|
|
|
Requires: java >= 1.5.0
|
|
|
|
Requires: jdom >= 1.0-1
|
|
|
|
Requires: log4j >= 1.1
|
|
|
|
#Requires: jakarta-oro
|
|
|
|
Requires: oro
|
|
|
|
# Use servletapi4 instead of servletapi5
|
|
|
|
Requires: servletapi4
|
|
|
|
Requires: werken-xpath
|
|
|
|
BuildRequires: ant >= 1.6.5
|
|
|
|
BuildRequires: ant-junit
|
|
|
|
BuildRequires: antlr
|
2012-12-19 13:35:05 +01:00
|
|
|
BuildRequires: avalon-logkit
|
2009-07-21 05:05:23 +02:00
|
|
|
BuildRequires: classworlds
|
2012-12-19 13:35:05 +01:00
|
|
|
BuildRequires: commons-collections
|
|
|
|
BuildRequires: commons-lang
|
2014-12-07 15:39:01 +01:00
|
|
|
BuildRequires: commons-logging
|
2012-12-19 13:35:05 +01:00
|
|
|
BuildRequires: hsqldb
|
2013-09-09 14:02:05 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2009-07-21 05:05:23 +02:00
|
|
|
BuildRequires: jdom >= 1.0-1
|
2012-12-19 13:35:05 +01:00
|
|
|
BuildRequires: junit
|
2009-07-21 05:05:23 +02:00
|
|
|
BuildRequires: log4j >= 1.1
|
|
|
|
BuildRequires: oro
|
|
|
|
# Use servletapi4 instead of servletapi5
|
2012-12-19 13:35:05 +01:00
|
|
|
BuildRequires: fdupes
|
2009-07-21 05:05:23 +02:00
|
|
|
BuildRequires: servletapi4
|
|
|
|
BuildRequires: werken-xpath
|
2013-09-09 14:02:05 +02:00
|
|
|
Requires(post): javapackages-tools
|
|
|
|
Requires(postun): javapackages-tools
|
2009-07-21 05:05:23 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%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
|
|
|
Requires(post): %{__rm}
|
|
|
|
Requires(post): /bin/ln
|
|
|
|
Requires(postun): %{__rm}
|
|
|
|
|
|
|
|
%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
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
# Remove all binary libs used in compiling the package.
|
|
|
|
# Note that velocity has some jar files containing macros under
|
|
|
|
# examples and test that should not be removed.
|
|
|
|
#find build -name '*.jar' -exec rm -f \{\} \;
|
|
|
|
for j in $(find . -name "*.jar" | grep -v /test/); do
|
|
|
|
mv $j $j.no
|
|
|
|
done
|
|
|
|
%patch0 -b .sav0
|
|
|
|
#%patch99 -b .sav99
|
|
|
|
|
|
|
|
%build
|
2012-12-19 13:35:05 +01:00
|
|
|
#export JAVA_HOME=%{_jvmdir}/java-1.5.0
|
2009-07-21 05:05:23 +02:00
|
|
|
# Use servletapi4 instead of servletapi5 in CLASSPATH
|
|
|
|
mkdir -p bin/test-lib
|
|
|
|
pushd bin/test-lib
|
|
|
|
ln -sf $(build-classpath hsqldb)
|
|
|
|
ln -sf $(build-classpath junit)
|
|
|
|
popd
|
|
|
|
mkdir -p bin/lib
|
|
|
|
pushd bin/lib
|
|
|
|
ln -sf $(build-classpath ant)
|
|
|
|
ln -sf $(build-classpath antlr)
|
2012-12-19 13:35:05 +01:00
|
|
|
ln -sf $(build-classpath avalon-logkit)
|
2009-07-21 05:05:23 +02:00
|
|
|
ln -sf $(build-classpath commons-collections)
|
|
|
|
ln -sf $(build-classpath commons-lang)
|
2014-12-07 15:39:01 +01:00
|
|
|
ln -sf $(build-classpath commons-logging)
|
2009-07-21 05:05:23 +02:00
|
|
|
ln -sf $(build-classpath jdom)
|
|
|
|
ln -sf $(build-classpath log4j)
|
|
|
|
ln -sf $(build-classpath oro)
|
|
|
|
ln -sf $(build-classpath servletapi4)
|
|
|
|
ln -sf $(build-classpath werken-xpath)
|
|
|
|
ln -sf $(build-classpath classworlds)
|
|
|
|
popd
|
|
|
|
export CLASSPATH=$(build-classpath jdom commons-collections commons-lang werken-xpath antlr)
|
|
|
|
CLASSPATH=$CLASSPATH:$(pwd)/test/texen-classpath/test.jar
|
|
|
|
export OPT_JAR_LIST="ant/ant-junit junit"
|
|
|
|
#FIXME: tests failed on CommonsExtPropTestCase
|
|
|
|
#but resulting files seems to be same
|
|
|
|
ant \
|
2014-06-27 16:17:44 +02:00
|
|
|
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
2009-07-21 05:05:23 +02:00
|
|
|
-buildfile build/build.xml \
|
|
|
|
jar javadocs #test
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
2013-09-11 10:47:47 +02:00
|
|
|
install -p -m 644 bin/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
2009-07-21 05:05:23 +02:00
|
|
|
# pom
|
2013-09-11 10:47:47 +02:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
2009-07-21 05:05:23 +02:00
|
|
|
install -pm 644 %{SOURCE1} \
|
2013-09-11 10:47:47 +02:00
|
|
|
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
|
|
|
%add_maven_depmap
|
|
|
|
|
2009-07-21 05:05:23 +02:00
|
|
|
# javadoc
|
2013-09-11 10:47:47 +02:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
|
|
cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
2009-07-21 05:05:23 +02:00
|
|
|
rm -rf docs/api
|
|
|
|
# data
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
2014-12-07 15:39:01 +01:00
|
|
|
cp -pr examples test $RPM_BUILD_ROOT%{_datadir}/%{name}
|
2009-07-21 05:05:23 +02:00
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc LICENSE NOTICE README.txt
|
|
|
|
%{_javadir}/*.jar
|
2013-09-11 10:47:47 +02:00
|
|
|
%{_mavenpomdir}/*
|
2009-07-21 05:05:23 +02:00
|
|
|
%config %{_mavendepmapfragdir}
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc docs/*
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
2013-09-11 10:47:47 +02:00
|
|
|
%{_javadocdir}/%{name}
|
2009-07-21 05:05:23 +02:00
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|