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
2e38329
%global fm_ver %{fm_compatible_ver}.13
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
Name:           freemarker
Victor G. Vasilyev 19f29ac
Version:        %{fm_ver}
2e38329
Release:        9%{?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
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# disabled functionality: ext/jdom, ext/jsp/FreeMarkerPageContext1, ext/xml/JdomNavigator
Victor G. Vasilyev c587bc2
Patch0:         %{name}-%{version}~build.patch
Victor G. Vasilyev c587bc2
# 
Victor G. Vasilyev c587bc2
Patch1:         %{name}-%{version}~PyObject.__class__.patch
Victor G. Vasilyev c587bc2
# http://netbeans.org/bugzilla/show_bug.cgi?id=156876
Victor G. Vasilyev c587bc2
Patch2:         %{name}-%{version}~logging.patch
Victor G. Vasilyev e01d7cb
# illegal character in the javadoc comment
Victor G. Vasilyev e01d7cb
Patch3:         %{name}-%{version}~encoding.patch
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Victor G. Vasilyev 19f29ac
BuildArch:      noarch
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
BuildRequires: ant >= 1.6
Victor G. Vasilyev 19f29ac
BuildRequires: ant-nodeps >= 1.6
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
Victor G. Vasilyev 19f29ac
BuildRequires: struts >= 1.2.9
Victor G. Vasilyev 19f29ac
BuildRequires: tomcat5-jsp-2.0-api >= 5.5.26
Victor G. Vasilyev 19f29ac
BuildRequires: tomcat5-servlet-2.4-api >= 5.5
Victor G. Vasilyev 19f29ac
BuildRequires: tomcat6-servlet-2.5-api >= 6.0
Victor G. Vasilyev 19f29ac
BuildRequires: tomcat6-lib >= 6.0.16
Victor G. Vasilyev 19f29ac
BuildRequires: xalan-j2 >= 2.7.0
2e38329
BuildRequires: tomcat6-lib
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:       %{name} = %{version}-%{release}
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
Victor G. Vasilyev 19f29ac
%patch0 -p1 -b .sav
Victor G. Vasilyev 19f29ac
%patch1 -p1
Victor G. Vasilyev c587bc2
%patch2 -p1
Victor G. Vasilyev e01d7cb
%patch3 -p1
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
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
Victor G. Vasilyev 19f29ac
%{__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
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/tomcat5-jsp-2.0-api.jar  lib/jsp-api-2.0.jar
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/tomcat6-jsp-2.1-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
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
Victor G. Vasilyev 19f29ac
# 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:
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/tomcat6-servlet-2.5-api.jar lib/servlet.jar
Victor G. Vasilyev 19f29ac
# so, el-api.jar is additionally used.
Victor G. Vasilyev 19f29ac
%{__ln_s} -f %{_javadir}/tomcat6/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
%{__rm} -rf %{buildroot}
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
# jars
Victor G. Vasilyev 19f29ac
%{__install} -d -m 755 %{buildroot}%{_javadir}
Victor G. Vasilyev 19f29ac
%{__install} -m 644 lib/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
Victor G. Vasilyev 19f29ac
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
Victor G. Vasilyev 19f29ac
# The freemarker 2.2 isn't compatible with 2.3.
Victor G. Vasilyev 19f29ac
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{fm_compatible_ver}.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
Victor G. Vasilyev 19f29ac
%clean
Victor G. Vasilyev 19f29ac
%{__rm} -rf %{buildroot}
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%files
Victor G. Vasilyev 19f29ac
%defattr(-,root,root,-)
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}
Victor G. Vasilyev 19f29ac
Victor G. Vasilyev 19f29ac
%changelog
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