e7811cc
# Conditionally build with a minimal dependency set
e7811cc
%bcond_with jp_minimal
e7811cc
e7811cc
Name:           freemarker
e7811cc
Version:        2.3.28
e7811cc
Release:        4%{?dist}
e7811cc
Summary:        The Apache FreeMarker Template Engine
e7811cc
License:        ASL 2.0
e7811cc
URL:            https://freemarker.apache.org/
e7811cc
Source0:        https://github.com/apache/incubator-freemarker/archive/v%{version}/%{name}-%{version}.tar.gz
e7811cc
e7811cc
# Remove JSP 2.0 API usage
e7811cc
Patch1:         jsp-api.patch
e7811cc
# Compile only the classes compatible with the version of jython
e7811cc
Patch2:         jython-compatibility.patch
e7811cc
# illegal character in the javadoc comment
e7811cc
Patch3:         fix-javadoc-encoding.patch
e7811cc
# Disable JRebel integration, it is not free software and not in Fedora
e7811cc
Patch5:         no-javarebel.patch
e7811cc
# enable jdom extension
e7811cc
Patch6:         enable-jdom.patch
e7811cc
# Fix compatibility with javacc 7
e7811cc
Patch7:         javacc-7.patch
e7811cc
e7811cc
BuildArch:      noarch
e7811cc
e7811cc
BuildRequires: ant
e7811cc
BuildRequires: apache-parent
e7811cc
BuildRequires: apache-commons-logging
e7811cc
BuildRequires: aqute-bnd
e7811cc
BuildRequires: hamcrest
e7811cc
BuildRequires: ivy-local
e7811cc
BuildRequires: glassfish-jsp-api
e7811cc
BuildRequires: glassfish-servlet-api
e7811cc
BuildRequires: javacc >= 7.0
e7811cc
BuildRequires: jaxen >= 1.1
e7811cc
BuildRequires: jcl-over-slf4j
e7811cc
BuildRequires: jdom >= 1.0
e7811cc
BuildRequires: junit
e7811cc
BuildRequires: log4j-over-slf4j
e7811cc
BuildRequires: slf4j
e7811cc
BuildRequires: xalan-j2 >= 2.7.0
e7811cc
e7811cc
%if %{without jp_minimal}
e7811cc
BuildRequires: dom4j
e7811cc
BuildRequires: saxpath
e7811cc
BuildRequires: jython
e7811cc
BuildRequires: rhino >= 1.6
e7811cc
%endif
e7811cc
e7811cc
%description
e7811cc
Apache FreeMarker is a template engine: a Java library to generate text output
e7811cc
(HTML web pages, e-mails, configuration files, source code, etc.) based on
e7811cc
templates and changing data. Templates are written in the FreeMarker Template
e7811cc
Language (FTL), which is a simple, specialized language (not a full-blown
e7811cc
programming language like PHP).
e7811cc
e7811cc
%package javadoc
e7811cc
Summary: Javadoc for %{name}
e7811cc
e7811cc
%description javadoc
e7811cc
This package contains the API documentation for %{name}.
e7811cc
e7811cc
%prep
e7811cc
%setup -q
e7811cc
e7811cc
find -type f -name "*.jar" -delete
e7811cc
find -type f -name "*.class" -delete
e7811cc
e7811cc
%patch1
e7811cc
%patch2
e7811cc
%patch3
e7811cc
%patch5
e7811cc
%patch6
e7811cc
%patch7 -p1
e7811cc
e7811cc
# Use system ivy settings
e7811cc
rm ivysettings.xml
e7811cc
e7811cc
# Correct classpath for Javadoc generation
e7811cc
sed -i 's/cachepath conf="IDE"/cachepath conf="javadoc"/' build.xml
e7811cc
sed -i '/conf name="IDE"/i<conf name="javadoc" extends="build.jython2.5,build.jsp2.1" />' ivy.xml
e7811cc
e7811cc
# Disable Java 8 javadoc linting
e7811cc
sed -i '/
e7811cc
e7811cc
# Drop unnecessary dep on avalon
e7811cc
sed -i -e '/avalon-logkit/d' ivy.xml
e7811cc
rm src/main/java/freemarker/log/_AvalonLoggerFactory.java
e7811cc
e7811cc
%if %{with jp_minimal}
e7811cc
# Drop dep on optional extra deps for minimal build
e7811cc
sed -i -e '/"rhino"/d' -e '/"jython"/d' ivy.xml
e7811cc
rm -rf src/main/java/freemarker/ext/{rhino,jython,ant}
e7811cc
rm src/main/java/freemarker/template/utility/JythonRuntime.java
e7811cc
# Drop dep on additional xml backends for minimal build
e7811cc
sed -i -e '/dom4j/d' -e '/saxpath/d' ivy.xml
e7811cc
rm src/main/java/freemarker/ext/xml/_Dom4jNavigator.java
e7811cc
%endif
e7811cc
e7811cc
%mvn_file org.%{name}:%{name} %{name}
e7811cc
e7811cc
%build
e7811cc
ant -Divy.mode=local -Ddeps.available=true javacc jar javadoc maven-pom
e7811cc
e7811cc
%install
e7811cc
%mvn_artifact build/pom.xml build/%{name}.jar
e7811cc
%mvn_install -J build/api
e7811cc
e7811cc
%files -f .mfiles
e7811cc
%doc README.md RELEASE-NOTES
e7811cc
%license LICENSE NOTICE
e7811cc
e7811cc
%files javadoc -f .mfiles-javadoc
e7811cc
%license LICENSE NOTICE
e7811cc
e7811cc
%changelog
e7811cc
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.28-4
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e7811cc
e7811cc
* Sat May 11 2019 Mat Booth <mat.booth@redhat.com> - 2.3.28-3
e7811cc
- Allow conditionally building with a reduced dependency set
e7811cc
e7811cc
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.28-2
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e7811cc
e7811cc
* Wed Aug 22 2018 Mat Booth <mat.booth@redhat.com> - 2.3.28-1
e7811cc
- Update to latest upstream release
e7811cc
- Drop unnecessary dep on saxpath and avalon
e7811cc
e7811cc
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.27-3
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e7811cc
e7811cc
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.27-2
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e7811cc
e7811cc
* Wed Dec 06 2017 Mat Booth <mat.booth@redhat.com> - 2.3.27-1
e7811cc
- Update to latest release, project moved to the Apache Foundation
e7811cc
- Drop unnecessary dep on findbugs
e7811cc
- Build against glassfish instead of jboss
e7811cc
e7811cc
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.23-5
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e7811cc
e7811cc
* Tue Apr 04 2017 Michael Simacek <msimacek@redhat.com> - 2.3.23-4
e7811cc
- Fix compatibility with javacc 7
e7811cc
e7811cc
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.23-3
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e7811cc
e7811cc
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.23-2
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e7811cc
e7811cc
* Wed Jan 06 2016 Omair Majid <omajid@redhat.com> - 2.3.23-1
e7811cc
- Update to 2.3.23
e7811cc
e7811cc
* Thu Jul 02 2015 gil cattaneo <puntogil@libero.it> 2.3.19-11
e7811cc
- fix FTBFS
e7811cc
- adapt to current guideline
e7811cc
- fix some rpmlint problems
e7811cc
- enable javadoc task
e7811cc
- enable maven-upload task for generate pom file
e7811cc
- Fix paths to jython
e7811cc
e7811cc
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-10
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e7811cc
e7811cc
* Mon Jun 09 2014 Omair Majid <omajid@redhat.com> - 2.3.19-9
e7811cc
- Use .mfiles to pick up xmvn metadata
e7811cc
- Don't use obsolete _mavendepmapfragdir macro
e7811cc
- Fix FTBFS issues
e7811cc
e7811cc
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-9
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e7811cc
e7811cc
* Mon Feb 24 2014 Omair Majid <omajid@redhat.com> - 2.3.19-8
e7811cc
- Require java-headless
e7811cc
e7811cc
* Fri Oct 04 2013 Omair Majid <omajid@redhat.com> - 2.3.19-7
e7811cc
- Fix upstream Source URL for pom file
e7811cc
e7811cc
* Mon Aug 05 2013 Omair Majid <omajid@redhat.com> - 2.3.19-7
e7811cc
- Fix build dependencies
e7811cc
e7811cc
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-6
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e7811cc
e7811cc
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-5
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e7811cc
e7811cc
* Wed Aug 01 2012 Omair Majid <omajid@redhat.com> - 2.3.19-4
e7811cc
- Build remaining classes with target 6 too.
e7811cc
- Fixes RHBZ#842594
e7811cc
e7811cc
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-3
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e7811cc
e7811cc
* Wed Jun 27 2012 Omair Majid <omajid@redhat.com> - 2.3.19-2
e7811cc
- Remove obsolete patches
e7811cc
e7811cc
* Tue Jun 05 2012 gil cattaneo 
e7811cc
- update patch for logging
e7811cc
e7811cc
* Thu May 31 2012 Omair Majid <omajid@redhat.com> - 2.3.19-1
e7811cc
- Add dependency on apache-commons-logging
e7811cc
e7811cc
* Wed May 16 2012 gil cattaneo <puntogil@libero.it> - 2.3.19-1
e7811cc
- update to 2.3.19
e7811cc
e7811cc
* Wed Feb 01 2012 Marek Goldmann <mgoldman@redhat.com> - 2.3.13-14
e7811cc
- Added Maven POM, RHBZ#786383
e7811cc
e7811cc
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-13
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e7811cc
e7811cc
* Wed Mar 16 2011 Omair Majid <omajid@redhat.com> - 2.3.13-12
e7811cc
- Drop build dependency on struts
e7811cc
- Remove buildroot cleaning and definition
e7811cc
- Remove versioned jars
e7811cc
- Remove dependency of javadoc subpackage on main package
e7811cc
e7811cc
* Mon Feb 28 2011 Omair Majid <omajid@redhat.com> - 2.3.13-12
e7811cc
- Remove dependency on tomcat5
e7811cc
e7811cc
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-11
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e7811cc
e7811cc
* Mon Sep 13 2010 Alexander Kurtakov <akurtako@redhat.com> 2.3.13-10
e7811cc
- Adapt to tomcat6-el jar rename.
e7811cc
e7811cc
* Mon Sep 13 2010 Alexander Kurtakov <akurtako@redhat.com> 2.3.13-9
e7811cc
- Add tomcat6-libs BR.
e7811cc
- Use global instead of define.
e7811cc
e7811cc
* Sat Feb 27 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-8
e7811cc
- fix build patch for use of the javacc 5.0
e7811cc
- patch for encoding
e7811cc
- disable brp-java-repack-jars
e7811cc
e7811cc
* Sat Feb 27 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-7
e7811cc
- patch for logging
e7811cc
- remove name from the summary
e7811cc
e7811cc
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-6
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e7811cc
e7811cc
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-5
e7811cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e7811cc
e7811cc
* Mon Sep 01 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-4
e7811cc
- Redundant dependency upon xerces-j2 is removed (#456276#c6)
e7811cc
- The dos2unix package is added as the build requirements
e7811cc
- The ant-nodeps build-time requirement is added
e7811cc
e7811cc
* Wed Aug 20 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-3
e7811cc
- The downloads.sourceforge.net host is used in the source URL
e7811cc
- %%{__install} and %%{__cp} are used everywhere
e7811cc
- %%defattr(-,root,root,-) is used everywhere
e7811cc
e7811cc
* Thu Aug 14 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-2
e7811cc
- Appropriate values of Group Tags are chosen from the official list
e7811cc
- Versions of java-devel & jpackage-utils are corrected
e7811cc
- Name of dir for javadoc is changed
e7811cc
- Manual is removed due to http://freemarker.org/docs/index.html
e7811cc
e7811cc
* Fri Jun 06 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-1
e7811cc
- Initial version