- Merge with latest from JPP.

- Remove fileversion and my_version macros.
- Remove notexentests patch and replace with a patch to disable
- failure on tests.
This commit is contained in:
Vivek Lakshmanan 2006-07-23 15:19:19 +00:00
parent 292b2f1edd
commit 9544dc345b
2 changed files with 145 additions and 15 deletions

View File

@ -0,0 +1,11 @@
--- ./build/testcases.xml.save 2006-07-22 21:26:04.000000000 -0400
+++ ./build/testcases.xml 2006-07-22 21:25:43.000000000 -0400
@@ -13,7 +13,7 @@
<property name="velocity.test.runner" value="junit.textui.TestRunner"/>
<!-- Turns on/off overall failure if one test fails -->
- <property name="testbed.failonerror" value="true"/>
+ <property name="testbed.failonerror" value="false"/>
<!-- Build classpath -->
<path id="classpath">

View File

@ -1,11 +1,43 @@
# Copyright (c) 2000-2005, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
%define section free %define section free
%define my_version 1.4
%define fileversion %{my_version}
Name: velocity Name: velocity
Version: %{my_version} Version: 1.4
Release: 3jpp_8fc Release: 5jpp_1fc
Epoch: 0 Epoch: 0
Summary: Java-based template engine Summary: Java-based template engine
License: Apache Software License License: Apache Software License
@ -13,32 +45,46 @@ Source: velocity-1.4-RHCLEAN.tar.bz2
Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch
Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch
Patch2: velocity-servletapi5.patch Patch2: velocity-servletapi5.patch
Patch3: velocity-notexentests.patch #Disable failure-on-tests rather than not running tests.
Patch3: velocity-build-testcases.patch
#Patch3: velocity-notexentests.patch
URL: http://jakarta.apache.org/velocity/ URL: http://jakarta.apache.org/velocity/
Group: Development/Libraries/Java Group: Development/Libraries/Java
Requires: jakarta-commons-collections Requires: jakarta-commons-collections
# Use servletapi5 instead of servletapi3
Requires: servletapi5 Requires: servletapi5
Requires: oro Requires: oro
Requires: werken.xpath Requires: werken.xpath
Requires: jdom >= 0:1.0-1 Requires: jdom >= 0:1.0-1
Requires: bcel Requires: bcel
Requires: log4j >= 0:1.1 Requires: log4j >= 0:1.1
#FIXME replace with excalibur-avalon-logkit when available
Requires: avalon-logkit Requires: avalon-logkit
BuildRequires: werken.xpath BuildRequires: werken.xpath
BuildRequires: ant BuildRequires: ant
BuildRequires: antlr BuildRequires: antlr
BuildRequires: junit BuildRequires: junit
BuildRequires: jakarta-commons-collections BuildRequires: jakarta-commons-collections
# Use servletapi5 instead of servletapi3
BuildRequires: servletapi5 BuildRequires: servletapi5
BuildRequires: oro BuildRequires: oro
BuildRequires: jdom >= 0:1.0-1 BuildRequires: jdom >= 0:1.0-1
BuildRequires: bcel BuildRequires: bcel
BuildRequires: log4j >= 0:1.1 BuildRequires: log4j >= 0:1.1
#FIXME replace with excalibur-avalon-logkit when available
BuildRequires: avalon-logkit BuildRequires: avalon-logkit
BuildRequires: jpackage-utils >= 0:1.5 BuildRequires: jpackage-utils >= 0:1.6
%if ! %{gcj_support}
BuildArch: noarch BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description %description
Velocity is a Java-based template engine. It permits anyone to use the Velocity is a Java-based template engine. It permits anyone to use the
simple yet powerful template language to reference objects defined in simple yet powerful template language to reference objects defined in
@ -70,7 +116,6 @@ Documentation for %{name}.
%package javadoc %package javadoc
Summary: Javadoc for %{name} Summary: Javadoc for %{name}
Group: Development/Documentation Group: Development/Documentation
Prereq: coreutils
%description javadoc %description javadoc
Javadoc for %{name}. Javadoc for %{name}.
@ -80,13 +125,19 @@ Summary: Demo for %{name}
Group: Development/Libraries/Java Group: Development/Libraries/Java
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description demo %description demo
Demonstrations and samples for %{name}. Demonstrations and samples for %{name}.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
%prep %prep
%setup -q -n %{name}-%{fileversion} %setup -q -n %{name}-%{version}
# Remove all binary libs used in compiling the package. # Remove all binary libs used in compiling the package.
# Note that velocity has some jar files containing macros under # Note that velocity has some jar files containing macros under
# examples and test that should not be removed. # examples and test that should not be removed.
@ -94,11 +145,14 @@ find build -name '*.jar' -exec rm -f \{\} \;
%patch0 -b .sav %patch0 -b .sav
%patch1 -b .sav %patch1 -b .sav
#Apply patch to remove explicit dependency on servletapi3
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
%build %build
# Use servletapi5 instead of servletapi3 in CLASSPATH
#FIXME Replace avalon-logkit with excalibur-avalon-logkit when ready
export CLASSPATH=$(build-classpath \ export CLASSPATH=$(build-classpath \
antlr \ antlr \
jakarta-commons-collections \ jakarta-commons-collections \
@ -123,12 +177,12 @@ rm -rf $RPM_BUILD_ROOT
# jars # jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 bin/%{name}-%{fileversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{fileversion}.jar install -p -m 644 bin/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{fileversion}*; do ln -sf ${jar} `echo $jar| sed "s|-%{fileversion}||g"`; done) (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc # javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{fileversion} install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{fileversion} cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
rm -rf docs/api rm -rf docs/api
# data # data
@ -137,6 +191,12 @@ cp -pr convert examples test $RPM_BUILD_ROOT%{_datadir}/%{name}
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
echo `pwd`
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -144,7 +204,7 @@ rm -rf $RPM_BUILD_ROOT
%post javadoc %post javadoc
rm -f %{_javadocdir}/%{name} rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{fileversion} %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc %postun javadoc
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
@ -153,18 +213,59 @@ fi
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
%post
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%post demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files %files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc LICENSE NOTICE README.txt %doc LICENSE NOTICE README.txt
%{_javadir}/*.jar %{_javadir}/*.jar
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}/velocity-1.4.jar.*
#FIXME: This was not generated by spec-convert-gcj-* script
#but natively compiled by aot-compile-rpm. There doesnt seem
#to be a jar in the buildroot for classloader, yet it is
#compiled by aot-compile-rpm! Find out why.
%attr(-,root,root) %{_libdir}/gcj/%{name}/classloader.*
%endif
%files manual %files manual
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc docs/* %doc docs/*
%files javadoc %files javadoc
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{fileversion} %{_javadocdir}/%{name}-%{version}
%files demo %files demo
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
@ -172,7 +273,25 @@ fi
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
#FIXME: Generated by spec-convert-gcj-* script. These cant be natively compiled
#since they only contain *.vm files. Check if these are ignored in subsequent versions
#of spec-convert-gcj-* script.
#%if %{gcj_support}
#%attr(-,root,root) %{_libdir}/gcj/%{name}/template.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/test1.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/test2.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/test1.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/test2.jar.*
#%attr(-,root,root) %{_libdir}/gcj/%{name}/test.jar.*
#%endif
%changelog %changelog
* Sat Jul 22 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-5jpp_1fc
- Merge with latest from JPP.
- Remove fileversion and my_version macros.
- Remove notexentests patch and replace with a patch to disable
- failure on tests.
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:1.4-3jpp_8fc * Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:1.4-3jpp_8fc
- Rebuilt - Rebuilt
@ -232,7 +351,7 @@ fi
- Added Patch #0 (velocity-1.4-rc1-ServletTest.patch) from CVS which fixes - Added Patch #0 (velocity-1.4-rc1-ServletTest.patch) from CVS which fixes
build problems. build problems.
* Sun May 25 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.1-2jpp * Sun May 25 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.3.1-2jpp
- Add Epochs to dependencies. - Add Epochs to dependencies.
- Add explicit defattrs. - Add explicit defattrs.
- Add non-versioned javadoc symlinks. - Add non-versioned javadoc symlinks.