From f2163e0de7153947f632832ca0e3e7d8e6d0553f Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Mon, 18 Oct 2004 19:49:33 +0000 Subject: [PATCH] auto-import velocity-1.4-3jpp on branch devel from velocity-1.4-3jpp.src.rpm --- .cvsignore | 1 + sources | 1 + ...aJDOMFactory-jdom-DefaultJDOMFactory.patch | 11 + velocity-AnakiaTask-jdom-XMLOutputter.patch | 21 ++ velocity.spec | 237 ++++++++++++++++++ 5 files changed, 271 insertions(+) create mode 100644 velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch create mode 100644 velocity-AnakiaTask-jdom-XMLOutputter.patch create mode 100644 velocity.spec diff --git a/.cvsignore b/.cvsignore index e69de29..d1ceea1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +velocity-1.4.tar.gz diff --git a/sources b/sources index e69de29..8a3969b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f280fee7ddb5eac5b354f6dea39a2f51 velocity-1.4.tar.gz diff --git a/velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch b/velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch new file mode 100644 index 0000000..fefd387 --- /dev/null +++ b/velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch @@ -0,0 +1,11 @@ +--- src/java/org/apache/velocity/anakia/AnakiaJDOMFactory.java.sav Thu Sep 23 12:46:10 2004 ++++ src/java/org/apache/velocity/anakia/AnakiaJDOMFactory.java Thu Sep 23 12:46:29 2004 +@@ -18,7 +18,7 @@ + + import org.jdom.Element; + import org.jdom.Namespace; +-import org.jdom.input.DefaultJDOMFactory; ++import org.jdom.DefaultJDOMFactory; + + /** + * A customized JDOMFactory for Anakia that produces {@link AnakiaElement} diff --git a/velocity-AnakiaTask-jdom-XMLOutputter.patch b/velocity-AnakiaTask-jdom-XMLOutputter.patch new file mode 100644 index 0000000..a83237c --- /dev/null +++ b/velocity-AnakiaTask-jdom-XMLOutputter.patch @@ -0,0 +1,21 @@ +--- src/java/org/apache/velocity/anakia/AnakiaTask.java.sav Wed Apr 14 14:26:40 2004 ++++ src/java/org/apache/velocity/anakia/AnakiaTask.java Thu Sep 23 13:01:14 2004 +@@ -34,6 +34,7 @@ + import org.jdom.Document; + import org.jdom.JDOMException; + import org.jdom.input.SAXBuilder; ++import org.jdom.output.Format; + + import org.apache.velocity.Template; + import org.apache.velocity.app.VelocityEngine; +@@ -343,7 +344,9 @@ + } + + OutputWrapper ow = new OutputWrapper(); +- ow.setEncoding (encoding); ++ Format owf = ow.getFormat(); ++ owf.setEncoding (encoding); ++ ow.setFormat (owf); + + context.put ("root", root.getRootElement()); + context.put ("xmlout", ow ); diff --git a/velocity.spec b/velocity.spec new file mode 100644 index 0000000..4a4a0cc --- /dev/null +++ b/velocity.spec @@ -0,0 +1,237 @@ +%define section free + +%define my_version 1.4 +%define fileversion %{my_version} + +Name: velocity +Version: %{my_version} +Release: 3jpp +Epoch: 0 +Summary: Java-based template engine +License: Apache Software License +Source: http://jakarta.apache.org/builds/jakarta-velocity/release/v1.4/velocity-1.4.tar.gz +Patch0: velocity-AnakiaJDOMFactory-jdom-DefaultJDOMFactory.patch +Patch1: velocity-AnakiaTask-jdom-XMLOutputter.patch +URL: http://jakarta.apache.org/velocity/ +Group: Development/Libraries/Java +Requires: jakarta-commons-collections +Requires: servlet +Requires: oro +Requires: werken.xpath +Requires: jdom >= 0:1.0-1 +Requires: bcel +Requires: log4j >= 0:1.1 +Requires: avalon-logkit +BuildRequires: werken.xpath +BuildRequires: ant +BuildRequires: antlr +BuildRequires: junit +BuildRequires: jakarta-commons-collections +BuildRequires: servletapi3 >= 0:3.3.1 +BuildRequires: oro +BuildRequires: jdom >= 0:1.0-1 +BuildRequires: bcel +BuildRequires: log4j >= 0:1.1 +BuildRequires: avalon-logkit +BuildRequires: jpackage-utils >= 0:1.5 +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Vendor: JPackage Project +Distribution: JPackage + +%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 +Documentation for %{name}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Documentation + +%description javadoc +Javadoc for %{name}. + +%package demo +Summary: Demo for %{name} +Group: Development/Libraries/Java +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description demo +Demonstrations and samples for %{name}. + +# ----------------------------------------------------------------------------- + +%prep +%setup -q -n %{name}-%{fileversion} +# 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 \{\} \; + +%patch0 -b .sav +%patch1 -b .sav +# ----------------------------------------------------------------------------- + +%build +export CLASSPATH=$(build-classpath \ +antlr \ +jakarta-commons-collections \ +servletapi3 \ +avalon-logkit \ +junit \ +oro \ +log4j \ +jdom \ +bcel \ +werken.xpath) +ant \ + -buildfile build/build.xml \ + -Djunit.jar=%{_javadir}/junit.jar \ + -Dbuild.sysclasspath=first \ + jar javadocs test + +# ----------------------------------------------------------------------------- + +%install +rm -rf $RPM_BUILD_ROOT + +# jars +install -d -m 755 $RPM_BUILD_ROOT%{_javadir} +install -p -m 644 bin/%{name}-%{fileversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{fileversion}.jar +(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{fileversion}*; do ln -sf ${jar} `echo $jar| sed "s|-%{fileversion}||g"`; done) + +# javadoc +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{fileversion} +cp -pr docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{fileversion} +rm -rf docs/api + +# data +install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} +cp -pr convert examples test $RPM_BUILD_ROOT%{_datadir}/%{name} + +# ----------------------------------------------------------------------------- + +%clean +rm -rf $RPM_BUILD_ROOT + +# ----------------------------------------------------------------------------- + +%post javadoc +rm -f %{_javadocdir}/%{name} +ln -s %{name}-%{fileversion} %{_javadocdir}/%{name} + +%postun javadoc +if [ "$1" = "0" ]; then + rm -f %{_javadocdir}/%{name} +fi + +# ----------------------------------------------------------------------------- + +%files +%defattr(0644,root,root,0755) +%doc LICENSE README.txt +%{_javadir}/*.jar + +%files manual +%defattr(0644,root,root,0755) +%doc docs/* + +%files javadoc +%defattr(0644,root,root,0755) +%{_javadocdir}/%{name}-%{fileversion} + +%files demo +%defattr(0644,root,root,0755) +%{_datadir}/%{name} + +# ----------------------------------------------------------------------------- + +%changelog +* Thu Sep 23 2004 Ralph Apel 0:1.4-3jpp +- Adapt to jdom-1.0-1 replacing org.jdom.input.DefaultJDOMFactory + by org.jdom.DefaultJDOMFactory in AnakiaJDOMFactory.java + as well as using org.jdom.output.Format in AnakiaTask.java +- Therefore require jdom >= 0:1.0-1 + +* Thu Sep 02 2004 Ralph Apel 0:1.4-2jpp +- Build with ant-1.6.2 + +* Mon Jun 07 2004 Kaj J. Niemi 0:1.4-1jpp +- 1.4 final +- Patch #0 is unnecessary (upstream) +- We have to build velocity against servletapi3 + +-* Wed Feb 18 2004 Kaj J. Niemi 0:1.4-0.rc1.2jpp +- Fix a few jpackage related .spec typos, oops. + +* Wed Feb 18 2004 Kaj J. Niemi 0:1.4-0.rc1.1jpp +- Added Patch #0 (velocity-1.4-rc1-ServletTest.patch) from CVS which fixes + build problems. + +* Sun May 25 2003 Ville Skyttä - 0:1.3.1-2jpp +- Add Epochs to dependencies. +- Add explicit defattrs. +- Add non-versioned javadoc symlinks. +- Use sed instead of bash 2 extension when symlinking jars during build. +- Use full URL in Source. +- Fix -javadoc Group tag. +- Drop patch in favour of ant options. +- BuildRequire jpackage-utils and antlr (latter needed for Anakia tests). + +* Sat May 24 2003 Richard Bullington-McGuire 1.3.1-1jpp +- 1.3.1 stable release + +* Fri May 23 2003 Richard Bullington-McGuire 1.3-1jpp +- 1.3 stable release +- Updated for JPackage 1.5 +- Run JUnit regression tests as part of the build process +- Added patch file to fix test case classpath for JUnit standard locations + +* Mon May 06 2002 Guillaume Rousse 1.3-0.rc1.1jpp +- 1.3.0rc1 +- dropped patch +- versioned dir for javadoc +- no dependencies for manual and javadoc packages +- stricter dependency for demo package + +* Wed Dec 12 2001 Guillaume Rousse 1.2-1jpp +- 1.2 +- regenerated patch and corrected manifest +- requires and buildrequires jdom >= 1.0-0.b7.1 + +* Wed Dec 5 2001 Guillaume Rousse 1.1-4jpp +- javadoc into javadoc package + +* Wed Nov 21 2001 Christian Zoffoli 1.1-3jpp +- removed packager tag +- new jpp extension + +* Thu Nov 1 2001 Guillaume Rousse 1.1-2jpp +- first unified release +- s/jPackage/JPackage + +* Fri Sep 14 2001 Guillaume Rousse 1.1-1jpp +- first Mandrake release