61c284
%bcond_without  hsqldb
61c284
61c284
Name:           velocity
61c284
Version:        1.7
fb02f1
Release:        24%{?dist}
61c284
Epoch:          0
61c284
Summary:        Java-based template engine
61c284
License:        ASL 2.0
61c284
URL:            http://velocity.apache.org/
61c284
BuildArch:      noarch
61c284
fb02f1
# ./generate-tarball.sh
fb02f1
Source0:        %{name}-%{version}.tar.gz
61c284
Source1:        http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}.pom
fb02f1
# Remove bundled binaries which cannot be easily verified for licensing
fb02f1
Source2:        generate-tarball.sh
61c284
61c284
Patch0:         0001-Remove-avalon-logkit.patch
61c284
Patch1:         0004-Use-log4j-1.2.17.patch
61c284
Patch2:         0003-Use-system-jars.patch
61c284
Patch3:         0004-JDBC-41-compat.patch
61c284
Patch4:         0001-Don-t-use-Werken-XPath.patch
61c284
Patch5:         0006-Skip-Java-8-incompatible-test.patch
61c284
Patch6:         velocity-1.7-doclint.patch
61c284
Patch7:         velocity-1.7-osgi.patch
61c284
61c284
BuildRequires:  javapackages-local
61c284
BuildRequires:  ant
61c284
BuildRequires:  antlr
61c284
BuildRequires:  junit
61c284
BuildRequires:  ant-junit
61c284
%if %{with hsqldb}
61c284
BuildRequires:  hsqldb-lib
61c284
%endif
61c284
BuildRequires:  apache-commons-collections
61c284
BuildRequires:  apache-commons-logging
61c284
BuildRequires:  apache-commons-lang
61c284
BuildRequires:  glassfish-servlet-api
61c284
BuildRequires:  jakarta-oro
61c284
BuildRequires:  jaxen
61c284
BuildRequires:  jdom
61c284
BuildRequires:  bcel
61c284
BuildRequires:  log4j12
61c284
BuildRequires:  apache-parent
61c284
61c284
# It fails one of the arithmetic test cases with gcj
61c284
BuildRequires:  java-devel >= 1:1.6.0
61c284
61c284
%description
61c284
Velocity is a Java-based template engine. It permits anyone to use the
61c284
simple yet powerful template language to reference objects defined in
61c284
Java code.
61c284
When Velocity is used for web development, Web designers can work in
61c284
parallel with Java programmers to develop web sites according to the
61c284
Model-View-Controller (MVC) model, meaning that web page designers can
61c284
focus solely on creating a site that looks good, and programmers can
61c284
focus solely on writing top-notch code. Velocity separates Java code
61c284
from the web pages, making the web site more maintainable over the long
61c284
run and providing a viable alternative to Java Server Pages (JSPs) or
61c284
PHP.
61c284
Velocity's capabilities reach well beyond the realm of web sites; for
61c284
example, it can generate SQL and PostScript and XML (see Anakia for more
61c284
information on XML transformations) from templates. It can be used
61c284
either as a standalone utility for generating source code and reports,
61c284
or as an integrated component of other systems. Velocity also provides
61c284
template services for the Turbine web application framework.
61c284
Velocity+Turbine provides a template service that will allow web
61c284
applications to be developed according to a true MVC model.
61c284
61c284
%package        manual
61c284
Summary:        Manual for %{name}
61c284
61c284
%description    manual
61c284
Documentation for %{name}.
61c284
61c284
%package        javadoc
61c284
Summary:        Javadoc for %{name}
61c284
61c284
%description    javadoc
61c284
Javadoc for %{name}.
61c284
61c284
%package        demo
61c284
Summary:        Demo for %{name}
61c284
Requires:       %{name} = %{epoch}:%{version}-%{release}
61c284
61c284
%description    demo
61c284
Demonstrations and samples for %{name}.
61c284
61c284
# -----------------------------------------------------------------------------
61c284
61c284
%prep
61c284
%setup -q
61c284
61c284
# remove bundled libs/classes (except those used for testing)
61c284
find . -name '*.jar' ! -name 'test*.jar' -print -delete
61c284
find . -name '*.class' ! -name 'Foo.class' -print -delete
61c284
61c284
# Remove dependency on avalon-logkit
61c284
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
61c284
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
61c284
rm -f src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
61c284
61c284
# need porting to new servlet API. We would just add a lot of empty functions
61c284
rm  src/test/org/apache/velocity/test/VelocityServletTestCase.java
61c284
61c284
# This test doesn't work with new hsqldb
61c284
rm src/test/org/apache/velocity/test/sql/DataSourceResourceLoaderTestCase.java
61c284
61c284
cp %{SOURCE1} ./pom.xml
61c284
61c284
# remove rest of avalon logkit refences
61c284
%patch0 -p1
61c284
61c284
# Use log4j 1.2.17
61c284
%patch1 -p1
61c284
61c284
# Use system jar files instead of downloading from net
61c284
%patch2 -p1
61c284
61c284
%patch3 -p1
61c284
61c284
# Use jdom instead of werken-xpath
61c284
%patch4 -p1
61c284
%pom_remove_dep werken-xpath:
61c284
61c284
# Skip Java 8 incompatible test
61c284
%patch5 -p1
61c284
61c284
# Disable Java8 doclint
61c284
%patch6 -p1
61c284
61c284
# Remove werken-xpath Import/Export refences in OSGi manifest file
61c284
%patch7 -p1
61c284
61c284
%if %{without hsqldb}
61c284
rm -r src/test/org/apache/velocity/test/sql
61c284
%endif
61c284
61c284
# -----------------------------------------------------------------------------
61c284
61c284
%build
61c284
61c284
export CLASSPATH=$(build-classpath \
61c284
antlr \
61c284
apache-commons-collections \
61c284
commons-lang \
61c284
commons-logging \
61c284
glassfish-servlet-api \
61c284
junit \
61c284
jakarta-oro \
61c284
log4j:log4j:1.2.17 \
61c284
jaxen \
61c284
jdom \
61c284
bcel \
61c284
hsqldb \
61c284
junit)
61c284
ant \
61c284
  -buildfile build/build.xml \
61c284
  -Dbuild.sysclasspath=first \
61c284
  -Djavac.target=1.6 \
61c284
  -Djavac.source=1.6 \
61c284
  jar javadocs test
61c284
61c284
# fix line-endings in generated files
61c284
sed -i 's/\r//' docs/api/stylesheet.css docs/api/package-list
61c284
61c284
# -----------------------------------------------------------------------------
61c284
61c284
%install
61c284
%mvn_file : %{name}
61c284
%mvn_alias : %{name}:%{name}
61c284
%mvn_artifact pom.xml bin/%{name}-%{version}.jar
61c284
%mvn_install -J docs/api
61c284
61c284
# zero-length file
61c284
rm -r test/issues/velocity-537/compare/velocity537.vm.cmp
61c284
# data
61c284
install -d -m 755 %{buildroot}%{_datadir}/%{name}
61c284
cp -pr examples test %{buildroot}%{_datadir}/%{name}
61c284
61c284
61c284
%files -f .mfiles
61c284
%doc README.txt
61c284
%license LICENSE NOTICE
61c284
61c284
%files manual
61c284
%license LICENSE NOTICE
61c284
%doc docs/*
61c284
61c284
%files javadoc -f .mfiles-javadoc
61c284
%license LICENSE NOTICE
61c284
61c284
%files demo
61c284
%license LICENSE NOTICE
61c284
%{_datadir}/%{name}
61c284
61c284
%changelog
fb02f1
* Tue Jul 31 2018 Michael Simacek <msimacek@redhat.com> - 0:1.7-24
fb02f1
- Repack the tarball without binaries
fb02f1
fb02f1
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-23
fb02f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fb02f1
61c284
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-22
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
61c284
61c284
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-21
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
61c284
61c284
* Tue Feb 07 2017 Michael Simacek <msimacek@redhat.com> - 0:1.7-20
61c284
- Add hsqldb conditional
61c284
- Switch to glassfish-servlet-api
61c284
61c284
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-19
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
61c284
61c284
* Wed Jul 22 2015 gil cattaneo <puntogil@libero.it> 0:1.7-18
61c284
- fix FTBFS rhbz#1240035
61c284
- fix BR list, change log4j with log4j12
61c284
- set javac source/target to 1.6
61c284
- disable Java8doc doclint
61c284
- remove werken-xpath Import/Export refences in manifest file
61c284
- resolve some rpmlint problems
61c284
- remove zero-length file
61c284
- introduce license macro
61c284
61c284
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-17
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
61c284
61c284
* Fri Nov 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-16
61c284
- Update to current packaging guidelines
61c284
61c284
* Thu Sep  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-15
61c284
- Require hsqldb-lib instead of hsqldb
61c284
61c284
* Wed Jun 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-14
61c284
- Apply patch for log4j 1.2.17
61c284
61c284
* Wed Jun 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-13
61c284
- Use log4j 1.2 compat package
61c284
- Skip Java 8 incompatible test
61c284
61c284
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-12
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
61c284
61c284
* Wed May 21 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-11
61c284
- Use .mfiles generated during build
61c284
61c284
* Sat Sep 21 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-10
61c284
- Port from werken-xpath to jdom
61c284
- Resolves: rhbz#875817
61c284
61c284
* Mon Aug 05 2013 Michal Srb <msrb@redhat.com> - 0:1.7-9
61c284
- Fix FTBFS (Resolves: #992852)
61c284
61c284
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-8
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
61c284
61c284
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-7
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
61c284
61c284
* Wed Nov 21 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7-6
61c284
- Install NOTICE files
61c284
- Resolves: rhbz#879021
61c284
61c284
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-5
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
61c284
61c284
* Tue Jun 05 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7-4
61c284
- Use new tomcat-servlet-api
61c284
- Update to latest guidelines
61c284
61c284
* Fri Feb 17 2012 Deepak Bhole <dbhole@redhat.com> - 0:1.7-3
61c284
- Resolved rhbz#791045
61c284
- Added patch from Omaid Majid <omajid@redhat.com> to fix build with Java 7
61c284
61c284
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-2
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
61c284
61c284
* Mon Feb 21 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7-1
61c284
- Update to latest version
61c284
- Drop old patches
61c284
61c284
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.4-3
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
61c284
61c284
* Fri Dec 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.6.4-2
61c284
- Add compatibility depmap
61c284
61c284
* Wed Nov  3 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.6.4-1
61c284
- Rebase to latest upstream
61c284
- Fix problems from bz#226525
61c284
61c284
* Thu Oct 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.6.3-5
61c284
- Use apache-commons-collections instead of jakarta name
61c284
- Use tomcat6 for dependency instead of tomcat5 (bz#640660)
61c284
61c284
* Mon Jun 7 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.6.3-4
61c284
- Fix BR/R for jakarta-commons-rename.
61c284
61c284
* Sat Feb 13 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-3
61c284
- Get (Build)Requires right
61c284
61c284
* Sat Feb 13 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-2
61c284
- Require all of the packages in the POM
61c284
- Add dist to version
61c284
61c284
* Fri Jan 15 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.6.3-1
61c284
- Update to 1.6.3
61c284
- Remove dependency on avalon-logkit
61c284
- Add maven metadata and pom
61c284
61c284
* Sun Jan 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.4-10.5
61c284
- Drop gcj_support.
61c284
- Fix groups and url.
61c284
- Use upstream tarball.
61c284
61c284
* Mon Aug 10 2009 Ville Skyttä <ville.skytta@iki.fi> - 0:1.4-10.4
61c284
- Convert specfile to UTF-8.
61c284
61c284
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4-9.4
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
61c284
61c284
* Fri Apr 24 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 0:1.4-8.4
61c284
- Fix FTBFS: added velocity-enum.patch (enum is a reserved keyword in java >= 1.5)
61c284
61c284
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.4-8.3
61c284
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
61c284
61c284
* Thu Jul 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.4-7.3
61c284
- drop repotag
61c284
61c284
* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.4-7jpp.2
61c284
- fix license tag
61c284
61c284
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.4-7jpp.1
61c284
- Autorebuild for GCC 4.3
61c284
61c284
* Tue Aug 08 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-6jpp.1
61c284
- Resync with latest from JPP.
61c284
- Partially adopt new naming convention.
61c284
61c284
* Sat Jul 22 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-5jpp_2fc
61c284
- Rebuilt
61c284
61c284
* Sat Jul 22 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:1.4-5jpp_1fc
61c284
- Merge with latest from JPP.
61c284
- Remove fileversion and my_version macros.
61c284
- Remove notexentests patch and replace with a patch to disable
61c284
- failure on tests.
61c284
61c284
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:1.4-3jpp_8fc
61c284
- Rebuilt
61c284
61c284
* Tue Jul 18 2006 Deepak Bhole <dbhole@redhat.com> - 0:1.4-3jpp_7fc
61c284
- Build on all archs.
61c284
61c284
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:1.4-3jpp_6fc
61c284
- rebuild
61c284
61c284
* Wed Mar  8 2006 Rafael Schloming <rafaels@redhat.com> - 0:1.4-3jpp_5fc
61c284
- excluded s390[x] and ppc64 due to eclipse
61c284
61c284
* Mon Mar  6 2006 Jeremy Katz <katzj@redhat.com> - 0:1.4-3jpp_4fc
61c284
- stop scriptlet spew
61c284
61c284
* Wed Dec 21 2005 Jesse Keating <jkeating@redhat.com> - 0:1.4-3jpp_3fc
61c284
- rebuilt again
61c284
61c284
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> - 0:1.4-3jpp_2fc
61c284
- rebuilt
61c284
61c284
* Tue Nov  8 2005 Vadim Nasardinov <vadimn@redhat.com> - 0:1.4-3jpp_1fc
61c284
- Converted from ISO-8859-1 to UTF-8
61c284
61c284
* Wed Jun 15 2005 Gary Benson <gbenson@redhat.com> 0:1.4-3jpp_1fc
61c284
- Build into Fedora.
61c284
61c284
* Thu Jun  9 2005 Gary Benson <gbenson@redhat.com>
61c284
- Remove jarfiles from the tarball.
61c284
61c284
* Mon Jun  6 2005 Gary Benson <gbenson@redhat.com>
61c284
- Build with servletapi5.
61c284
- Add NOTICE file as per Apache License version 2.0.
61c284
- Skip some failing tests.
61c284
61c284
* Mon Oct 18 2004 Fernando Nasser <fnasser@redhat.com> 0:1.4-3jpp_1rh
61c284
- First Red Hat build
61c284
61c284
* Thu Sep 23 2004 Ralph Apel <r.apel at r-apel.de> 0:1.4-3jpp
61c284
- Adapt to jdom-1.0-1 replacing org.jdom.input.DefaultJDOMFactory
61c284
  by org.jdom.DefaultJDOMFactory in AnakiaJDOMFactory.java
61c284
  as well as using org.jdom.output.Format in AnakiaTask.java
61c284
- Therefore require jdom >= 0:1.0-1
61c284
61c284
* Thu Sep 02 2004 Ralph Apel <r.apel at r-apel.de> 0:1.4-2jpp
61c284
- Build with ant-1.6.2
61c284
61c284
* Mon Jun 07 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:1.4-1jpp
61c284
- 1.4 final
61c284
- Patch #0 is unnecessary (upstream)
61c284
- We have to build velocity against servletapi3
61c284
61c284
* Wed Feb 18 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:1.4-0.rc1.2jpp
61c284
- Fix a few jpackage related .spec typos, oops.
61c284
61c284
* Wed Feb 18 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:1.4-0.rc1.1jpp
61c284
- Added Patch #0 (velocity-1.4-rc1-ServletTest.patch) from CVS which fixes
61c284
  build problems.
61c284
61c284
* Sun May 25 2003 Ville Skyttä <ville.skytta@iki.fi> - 0:1.3.1-2jpp
61c284
- Add Epochs to dependencies.
61c284
- Add explicit defattrs.
61c284
- Add non-versioned javadoc symlinks.
61c284
- Use sed instead of bash 2 extension when symlinking jars during build.
61c284
- Use full URL in Source.
61c284
- Fix -javadoc Group tag.
61c284
- Drop patch in favour of ant options.
61c284
- BuildRequire jpackage-utils and antlr (latter needed for Anakia tests).
61c284
61c284
* Sat May 24 2003 Richard Bullington-McGuire <rbulling@pkrinternet.com> 1.3.1-1jpp
61c284
- 1.3.1 stable release
61c284
61c284
* Fri May 23 2003 Richard Bullington-McGuire <rbulling@pkrinternet.com> 1.3-1jpp
61c284
- 1.3 stable release
61c284
- Updated for JPackage 1.5
61c284
- Run JUnit regression tests as part of the build process
61c284
- Added patch file to fix test case classpath for JUnit standard locations
61c284
61c284
* Mon May 06 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.3-0.rc1.1jpp
61c284
- 1.3.0rc1
61c284
- dropped patch
61c284
- versioned dir for javadoc
61c284
- no dependencies for manual and javadoc packages
61c284
- stricter dependency for demo package
61c284
61c284
* Wed Dec 12 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.2-1jpp
61c284
- 1.2
61c284
- regenerated patch and corrected manifest
61c284
- requires and buildrequires jdom >= 1.0-0.b7.1
61c284
61c284
* Wed Dec 5 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.1-4jpp
61c284
- javadoc into javadoc package
61c284
61c284
* Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 1.1-3jpp
61c284
- removed packager tag
61c284
- new jpp extension
61c284
61c284
* Thu Nov 1 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.1-2jpp
61c284
- first unified release
61c284
- s/jPackage/JPackage
61c284
61c284
* Fri Sep 14 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.1-1jpp
61c284
- first Mandrake release