Victor G. Vasilyev e01d7cb
# Prevent brp-java-repack-jars from being run.
2e38329
%global __jar_repack %{nil}
Victor G. Vasilyev e01d7cb
2e38329
%global checkForbiddenJARFiles F=`find -type f -iname '*.jar'`; [ ! -z "$F" ] && \
Victor G. Vasilyev 19f29ac
echo "ERROR: Sources should not contain JAR files:" && echo "$F" && exit 1
Victor G. Vasilyev 19f29ac
2e38329
%global fm_compatible_ver 2.3
c333a00
%global fm_ver %{fm_compatible_ver}.19
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
Name:           freemarker
Victor G. Vasilyev 19f29ac
Version:        %{fm_ver}
d8aafa6
Release:        7%{?dist}
Victor G. Vasilyev c587bc2
Summary:        A template engine
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
Group:          Development/Libraries
Victor G. Vasilyev 19f29ac
License:        BSD
Victor G. Vasilyev 19f29ac
URL:            http://freemarker.sourceforge.net/
Victor G. Vasilyev 19f29ac
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
c333a00
Source1:        http://freemarker.sourceforge.net/maven2/org/%{name}/%{name}/%{version}/%{name}-%{version}.pom
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# disabled functionality: ext/jdom, ext/jsp/FreeMarkerPageContext1, ext/xml/JdomNavigator
c333a00
Patch0:         %{name}-%{version}-build.patch
c333a00
#
c333a00
Patch1:         %{name}-2.3.13~PyObject.__class__.patch
Victor G. Vasilyev c587bc2
# http://netbeans.org/bugzilla/show_bug.cgi?id=156876
f458f5b
Patch2:         %{name}-%{version}-logging.patch
Victor G. Vasilyev e01d7cb
# illegal character in the javadoc comment
c333a00
Patch3:         %{name}-2.3.13~encoding.patch
d35ebdb
# do not depend on tomcat5
c333a00
Patch4:         %{name}-%{version}-no-tomcat5.patch
c333a00
# Disable JavaRebelIntegration
c333a00
Patch5:         %{name}-%{version}-no-javarebel.patch
c333a00
# enable jdom extension
c333a00
Patch6:         %{name}-%{version}-enable-jdom.patch
c333a00
# use system javacc and fix Token.java
c333a00
Patch7:         %{name}-%{version}-javacc.patch
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
BuildArch:      noarch
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
BuildRequires: ant >= 1.6
673f99b
BuildRequires: apache-commons-logging
Victor G. Vasilyev 19f29ac
BuildRequires: avalon-logkit >= 1.2
Victor G. Vasilyev 19f29ac
BuildRequires: dom4j >= 1.6.1
Victor G. Vasilyev 19f29ac
BuildRequires: dos2unix
Victor G. Vasilyev 19f29ac
BuildRequires: emma >= 2.0
Victor G. Vasilyev 19f29ac
BuildRequires: java-devel >= 1:1.6.0
Victor G. Vasilyev 19f29ac
BuildRequires: javacc >= 4.0
Victor G. Vasilyev 19f29ac
BuildRequires: jaxen >= 1.1
Victor G. Vasilyev 19f29ac
BuildRequires: jdom >= 1.0
Victor G. Vasilyev 19f29ac
BuildRequires: jpackage-utils
Victor G. Vasilyev 19f29ac
BuildRequires: junit >= 3.8.2
Victor G. Vasilyev 19f29ac
BuildRequires: jython >= 2.2.1
Victor G. Vasilyev 19f29ac
BuildRequires: log4j >= 1.2
Victor G. Vasilyev 19f29ac
BuildRequires: rhino >= 1.6
c333a00
BuildRequires: slf4j
d8aafa6
BuildRequires: tomcat-el-2.2-api
d8aafa6
BuildRequires: tomcat-lib >= 6.0.16
d8aafa6
BuildRequires: tomcat-jsp-2.2-api
d8aafa6
BuildRequires: tomcat-servlet-3.0-api >= 6.0
Victor G. Vasilyev 19f29ac
BuildRequires: xalan-j2 >= 2.7.0
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
Requires: java >= 1:1.6.0
Victor G. Vasilyev 19f29ac
Requires: jpackage-utils
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%description
Victor G. Vasilyev 19f29ac
FreeMarker is a Java tool to generate text output based on templates.
Victor G. Vasilyev 19f29ac
It is designed to be practical as a template engine to generate web
Victor G. Vasilyev 19f29ac
pages and particularly for servlet-based page production that follows
Victor G. Vasilyev 19f29ac
the MVC (Model View Controller) pattern. That is, you can separate the
Victor G. Vasilyev 19f29ac
work of Java programmers and website designers - Java programmers
Victor G. Vasilyev 19f29ac
needn't know how to design nice websites, and website designers needn't
Victor G. Vasilyev 19f29ac
know Java programming.
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%package javadoc
Victor G. Vasilyev 19f29ac
Summary:        Javadocs for %{name}
Victor G. Vasilyev 19f29ac
Group:          Documentation
Victor G. Vasilyev 19f29ac
Requires:       jpackage-utils
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%description javadoc
Victor G. Vasilyev 19f29ac
This package contains the API documentation for %{name}.
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%prep
Victor G. Vasilyev 19f29ac
%setup -q -n %{name}-%{version}
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
find -type f \( -iname '*.jar' -o -iname '*.class' \)  -exec rm -f '{}' \;
Victor G. Vasilyev 19f29ac
c333a00
%patch0 -p0
c333a00
#  % p atch1 -p1
c333a00
%patch2 -p0
Victor G. Vasilyev e01d7cb
%patch3 -p1
c333a00
%patch4 -p0
c333a00
%patch5 -p1
c333a00
%patch6 -p1
c333a00
%patch7 -p0
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# %{__rm} -rf src/freemarker/core/ParseException.java
Victor G. Vasilyev 19f29ac
%{__rm} -rf src/freemarker/core/FMParser.java
Victor G. Vasilyev 19f29ac
%{__rm} -rf src/freemarker/core/FMParserConstants.java
Victor G. Vasilyev 19f29ac
%{__rm} -rf src/freemarker/core/FMParserTokenManager.java
Victor G. Vasilyev 19f29ac
%{__rm} -rf src/freemarker/core/SimpleCharStream.java
Victor G. Vasilyev 19f29ac
%{__rm} -rf src/freemarker/core/Token.java
Victor G. Vasilyev 19f29ac
%{__rm} -rf src/freemarker/core/TokenMgrError.java
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/ant.jar           lib/ant.jar
673f99b
%{__ln_s} -f %{_javadir}/commons-logging.jar    lib/commons-logging.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/dom4j.jar         lib/dom4j.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/emma_ant.jar      lib/emma_ant.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/emma.jar          lib/emma.jar
c333a00
#%{__ln_s} -f %{_javadir}/javacc.jar        lib/javacc.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/jaxen.jar         lib/jaxen.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/jdom.jar          lib/jdom.jar
Victor G. Vasilyev 19f29ac
# js.jsr provided by rhino package
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/js.jar            lib/js.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# The JavaServer Pages 1.2 technology isn't provided in Fedora 10
Victor G. Vasilyev 19f29ac
#%{__ln_s} -f %{_javadir}/jsp-api-1.2.jar   lib/jsp-api-1.2.jar
Victor G. Vasilyev 19f29ac
d8aafa6
%{__ln_s} -f %{_javadir}/tomcat-jsp-api.jar  lib/jsp-api-2.0.jar
Victor G. Vasilyev 19f29ac
d8aafa6
%{__ln_s} -f %{_javadir}/tomcat-jsp-api.jar  lib/jsp-api-2.1.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/junit.jar         lib/junit.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/jython.jar        lib/jython.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/log4j.jar         lib/log4j.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/avalon-logkit.jar lib/logkit.jar
c333a00
%{__ln_s} -f %{_javadir}/slf4j/api.jar lib/slf4j-api.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# It doesn't required due to OpenJDK 6 is used
Victor G. Vasilyev 19f29ac
#%{__ln_s} -f %{_javadir}/rt122.jar         lib/rt122.jar
Victor G. Vasilyev 19f29ac
d8aafa6
# SAXPath has been merged into the Jaxen codebase and is
Victor G. Vasilyev 19f29ac
# no longer being maintained separately. See jaxen-1.1.jar
Victor G. Vasilyev 19f29ac
#%{__ln_s} -f %{_javadir}/saxpath.jar       lib/saxpath.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# The package javax.el isn't included in:
d8aafa6
%{__ln_s} -f %{_javadir}/tomcat-servlet-api.jar lib/servlet.jar
Victor G. Vasilyev 19f29ac
# so, el-api.jar is additionally used.
d8aafa6
%{__ln_s} -f %{_javadir}/tomcat-el-api.jar lib/el-api.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/struts.jar        lib/struts.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/xalan-j2.jar      lib/xalan.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
dos2unix -k docs/docs/api/stylesheet.css
Victor G. Vasilyev 19f29ac
dos2unix -k docs/docs/api/package-list
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%checkForbiddenJARFiles
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%build
Victor G. Vasilyev 19f29ac
%{ant}
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%install
Victor G. Vasilyev 19f29ac
# jars
Victor G. Vasilyev 19f29ac
%{__install} -d -m 755 %{buildroot}%{_javadir}
d35ebdb
%{__install} -m 644 lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# javadoc
Victor G. Vasilyev 19f29ac
%{__install} -d -m 755 %{buildroot}%{_javadocdir}/%{name}
Victor G. Vasilyev 19f29ac
%{__cp} -pr docs/docs/api/* %{buildroot}%{_javadocdir}/%{name}
Victor G. Vasilyev 19f29ac
fcdb4f9
# pom
fcdb4f9
%{__install} -d -m 755 %{buildroot}%{_mavenpomdir}
fcdb4f9
%{__install} -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
fcdb4f9
fcdb4f9
# depmap
fcdb4f9
%add_maven_depmap JPP-%{name}.pom %{name}.jar
fcdb4f9
Victor G. Vasilyev 19f29ac
%files
Victor G. Vasilyev 19f29ac
%defattr(-,root,root,-)
fcdb4f9
%{_mavenpomdir}/*
fcdb4f9
%{_mavendepmapfragdir}/*
Victor G. Vasilyev 19f29ac
%{_javadir}/*.jar
Victor G. Vasilyev 19f29ac
%doc LICENSE.txt README.txt
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%files javadoc
Victor G. Vasilyev 19f29ac
%defattr(-,root,root,-)
Victor G. Vasilyev 19f29ac
%{_javadocdir}/%{name}
d35ebdb
%doc LICENSE.txt
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%changelog
d8aafa6
* Mon Aug 05 2013 Omair Majid <omajid@redhat.com> - 2.3.19-7
d8aafa6
- Fix build dependencies
d8aafa6
1b71cca
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-6
1b71cca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
1b71cca
7fb69fb
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-5
7fb69fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7fb69fb
beea566
* Wed Aug 01 2012 Omair Majid <omajid@redhat.com> - 2.3.19-4
beea566
- Build remaining classes with target 6 too.
beea566
- Fixes RHBZ#842594
beea566
bdfd51d
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.19-3
bdfd51d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
bdfd51d
f458f5b
* Wed Jun 27 2012 Omair Majid <omajid@redhat.com> - 2.3.19-2
f458f5b
- Remove obsolete patches
f458f5b
da65ad1
* Tue Jun 05 2012 gil cattaneo 
da65ad1
- update patch for logging
da65ad1
673f99b
* Thu May 31 2012 Omair Majid <omajid@redhat.com> - 2.3.19-1
673f99b
- Add dependency on apache-commons-logging
673f99b
c333a00
* Wed May 16 2012 gil cattaneo <puntogil@libero.it> - 2.3.19-1
c333a00
- update to 2.3.19
c333a00
fcdb4f9
* Wed Feb 01 2012 Marek Goldmann <mgoldman@redhat.com> - 2.3.13-14
fcdb4f9
- Added Maven POM, RHBZ#786383
fcdb4f9
5f8972a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-13
5f8972a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5f8972a
d35ebdb
* Wed Mar 16 2011 Omair Majid <omajid@redhat.com> - 2.3.13-12
d35ebdb
- Drop build dependency on struts
d35ebdb
- Remove buildroot cleaning and definition
d35ebdb
- Remove versioned jars
d35ebdb
- Remove dependency of javadoc subpackage on main package
d35ebdb
d35ebdb
* Mon Feb 28 2011 Omair Majid <omajid@redhat.com> - 2.3.13-12
d35ebdb
- Remove dependency on tomcat5
d35ebdb
4593edd
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-11
4593edd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4593edd
652fa83
* Mon Sep 13 2010 Alexander Kurtakov <akurtako@redhat.com> 2.3.13-10
652fa83
- Adapt to tomcat6-el jar rename.
652fa83
2e38329
* Mon Sep 13 2010 Alexander Kurtakov <akurtako@redhat.com> 2.3.13-9
2e38329
- Add tomcat6-libs BR.
2e38329
- Use global instead of define.
2e38329
Victor G. Vasilyev 799a3ae
* Sat Feb 27 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-8
Victor G. Vasilyev e01d7cb
- fix build patch for use of the javacc 5.0
Victor G. Vasilyev e01d7cb
- patch for encoding
Victor G. Vasilyev e01d7cb
- disable brp-java-repack-jars
Victor G. Vasilyev c587bc2
Victor G. Vasilyev 799a3ae
* Sat Feb 27 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-7
Victor G. Vasilyev 799a3ae
- patch for logging
Victor G. Vasilyev 799a3ae
- remove name from the summary
Victor G. Vasilyev 799a3ae
33b417a
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-6
33b417a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
33b417a
4ceab7b
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.13-5
4ceab7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4ceab7b
Victor G. Vasilyev 19f29ac
* Mon Sep 01 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-4
Victor G. Vasilyev 19f29ac
- Redundant dependency upon xerces-j2 is removed (#456276#c6)
Victor G. Vasilyev 19f29ac
- The dos2unix package is added as the build requirements
Victor G. Vasilyev 19f29ac
- The ant-nodeps build-time requirement is added
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
* Wed Aug 20 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-3
Victor G. Vasilyev 19f29ac
- The downloads.sourceforge.net host is used in the source URL
Victor G. Vasilyev 19f29ac
- %%{__install} and %%{__cp} are used everywhere
Victor G. Vasilyev 19f29ac
- %%defattr(-,root,root,-) is used everywhere
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
* Fri Aug 14 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-2
Victor G. Vasilyev 19f29ac
- Appropriate values of Group Tags are chosen from the official list
Victor G. Vasilyev 19f29ac
- Versions of java-devel & jpackage-utils are corrected
Victor G. Vasilyev 19f29ac
- Name of dir for javadoc is changed
Victor G. Vasilyev 19f29ac
- Manual is removed due to http://freemarker.org/docs/index.html
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
* Fri Jun 06 2008 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.3.13-1
Victor G. Vasilyev 19f29ac
- Initial version