Matt Wringe 80e91b5
# Copyright (c) 2000-2005, JPackage Project
Matt Wringe 80e91b5
# All rights reserved.
Matt Wringe 80e91b5
#
Matt Wringe 80e91b5
# Redistribution and use in source and binary forms, with or without
Matt Wringe 80e91b5
# modification, are permitted provided that the following conditions
Matt Wringe 80e91b5
# are met:
Matt Wringe 80e91b5
#
Matt Wringe 80e91b5
# 1. Redistributions of source code must retain the above copyright
Matt Wringe 80e91b5
#    notice, this list of conditions and the following disclaimer.
Matt Wringe 80e91b5
# 2. Redistributions in binary form must reproduce the above copyright
Matt Wringe 80e91b5
#    notice, this list of conditions and the following disclaimer in the
Matt Wringe 80e91b5
#    documentation and/or other materials provided with the
Matt Wringe 80e91b5
#    distribution.
Matt Wringe 80e91b5
# 3. Neither the name of the JPackage Project nor the names of its
Matt Wringe 80e91b5
#    contributors may be used to endorse or promote products derived
Matt Wringe 80e91b5
#    from this software without specific prior written permission.
Matt Wringe 80e91b5
#
Matt Wringe 80e91b5
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Matt Wringe 80e91b5
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Matt Wringe 80e91b5
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Matt Wringe 80e91b5
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Matt Wringe 80e91b5
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Matt Wringe 80e91b5
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Matt Wringe 80e91b5
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Matt Wringe 80e91b5
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Matt Wringe 80e91b5
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Matt Wringe 80e91b5
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Matt Wringe 80e91b5
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Matt Wringe 80e91b5
#
Matt Wringe 80e91b5
Matt Wringe 80e91b5
Name:           httpunit
eece196
Version:        1.7
Yaakov Selkowitz c7f604d
Release:        15%{?dist}
Matt Wringe 80e91b5
Epoch:          0
Matt Wringe 80e91b5
Summary:        Automated web site testing toolkit
13cbd20
License:        MIT and ASL 2.0
13cbd20
# ./create-tarball.sh %%{version}
13cbd20
Source0:        httpunit-1.7-clean.tar.gz
17e2ce2
Source1:        http://repo1.maven.org/maven2/httpunit/httpunit/1.7/httpunit-1.7.pom
13cbd20
# replacement for non-free XML DTD files
13cbd20
Source2:        https://raw.github.com/apache/tomcat/TOMCAT_7_0_42/java/javax/servlet/resources/web-app_2_2.dtd
13cbd20
Source3:        https://raw.github.com/apache/tomcat/TOMCAT_7_0_42/java/javax/servlet/resources/web-app_2_3.dtd
13cbd20
Source4:        https://raw.github.com/apache/tomcat/TOMCAT_7_0_42/java/javax/servlet/resources/web-app_2_4.xsd
13cbd20
# sources 2-4 are licensed under ASL 2.0
13cbd20
Source5:        http://www.apache.org/licenses/LICENSE-2.0.txt
Matt Wringe 80e91b5
Patch1:         %{name}-JavaScript-NotAFunctionException.patch
Matt Wringe 80e91b5
Patch2:         %{name}-servlettest.patch
c3e8379
Patch3:         %{name}-not-implemented.patch
70f3c5d
Patch4:         junit4.patch
Matt Wringe 80e91b5
URL:            http://httpunit.sourceforge.net/
Matt Wringe 80e91b5
BuildRequires:  jpackage-utils >= 0:1.6
Matt Wringe 80e91b5
BuildRequires:  ant >= 0:1.6
Matt Wringe 80e91b5
BuildRequires:  nekohtml
Matt Wringe 80e91b5
BuildRequires:  jtidy
Matt Wringe 80e91b5
BuildRequires:  junit >= 0:3.8
Stanislav Ochotnicky c2fe02f
BuildRequires:  tomcat-servlet-3.0-api
Matt Wringe 80e91b5
BuildRequires:  javamail >= 0:1.3
Matt Wringe 80e91b5
BuildRequires:  rhino
9dd05b5
BuildRequires:  java-devel >= 1:1.6.0
13cbd20
Matt Wringe 80e91b5
Requires:       junit >= 0:3.8
Stanislav Ochotnicky c2fe02f
Requires:       tomcat-servlet-3.0-api
Matt Wringe 80e91b5
# As of 1.5, requires either nekohtml or jtidy, and prefers nekohtml.
Matt Wringe 80e91b5
Requires:       nekohtml
Matt Wringe 80e91b5
Requires:       rhino
13cbd20
Matt Wringe 80e91b5
BuildArch:      noarch
13cbd20
eece196
Obsoletes:      %{name}-demo < %{epoch}:%{version}
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%description
Matt Wringe 80e91b5
HttpUnit emulates the relevant portions of browser behavior, including form
Matt Wringe 80e91b5
submission, JavaScript, basic http authentication, cookies and automatic page
Matt Wringe 80e91b5
redirection, and allows Java test code to examine returned pages either as
Matt Wringe 80e91b5
text, an XML DOM, or containers of forms, tables, and links.
Matt Wringe 80e91b5
A companion framework, ServletUnit is included in the package.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%package        javadoc
Matt Wringe 80e91b5
Summary:        Javadoc for %{name}
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%description    javadoc
Matt Wringe 80e91b5
Javadoc for %{name}
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%package        doc
Matt Wringe 80e91b5
Summary:        Documentation for %{name}
Matt Wringe 80e91b5
Requires:       %{name}-javadoc
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%description    doc
Matt Wringe 80e91b5
Documentation for %{name}
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%prep
Matt Wringe 80e91b5
%setup -q
Matt Wringe 80e91b5
# patch to work with rhino 1.5
Matt Wringe 80e91b5
%patch1 -b .sav
Matt Wringe 80e91b5
# add META-INF
Matt Wringe 80e91b5
%patch2
c3e8379
%patch3 -p1
70f3c5d
%patch4
70f3c5d
896a70e
sed -i -e 's|destdir|encoding="iso-8859-1" destdir|g' build.xml
896a70e
eece196
sed -i -e 's|setCharEncoding( org.w3c.tidy.Configuration.UTF8 )|setInputEncoding("UTF-8")|g' src/com/meterware/httpunit/parsing/JTidyHTMLParser.java
13cbd20
13cbd20
# remove all binary libs and javadocs
Matt Wringe 80e91b5
find . -name "*.jar" -exec rm -f {} \;
Matt Wringe 80e91b5
rm -rf doc/api
13cbd20
Matt Wringe 80e91b5
ln -s \
Matt Wringe 80e91b5
  %{_javadir}/junit.jar \
Matt Wringe 80e91b5
  %{_javadir}/jtidy.jar \
Matt Wringe 80e91b5
  %{_javadir}/nekohtml.jar \
Stanislav Ochotnicky c2fe02f
  %{_javadir}/tomcat-servlet-api.jar \
Matt Wringe 80e91b5
  %{_javadir}/js.jar \
Matt Wringe 80e91b5
  %{_javadir}/xerces-j2.jar \
Matt Wringe 80e91b5
  jars
Matt Wringe 80e91b5
17e2ce2
mv %{SOURCE1} pom.xml
13cbd20
mv %{SOURCE2} META-INF/
13cbd20
mv %{SOURCE3} META-INF/
13cbd20
mv %{SOURCE4} META-INF/
13cbd20
mv %{SOURCE5} LICENSE-ASL
17e2ce2
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%build
9dd05b5
export CLASSPATH=$(build-classpath javamail)
896a70e
export ANT_OPTS="-Dfile.encoding=iso-8859-1"
Matt Wringe 80e91b5
ant -Dbuild.compiler=modern -Dbuild.sysclasspath=last \
eece196
  jar javadocs test servlettest 
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%install
Matt Wringe 80e91b5
mkdir -p $RPM_BUILD_ROOT%{_javadir}
f8e149d
cp -p lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
Matt Wringe 80e91b5
Matt Wringe 80e91b5
# Javadoc
Matt Wringe 80e91b5
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Matt Wringe 80e91b5
cp -pr doc/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
Matt Wringe 80e91b5
17e2ce2
# POM
17e2ce2
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
17e2ce2
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
17e2ce2
%add_maven_depmap JPP-%{name}.pom %{name}.jar
17e2ce2
17e2ce2
Matt Wringe 80e91b5
# Avoid having api in doc
Matt Wringe 80e91b5
rm -rf doc/api
Matt Wringe 80e91b5
Matt Wringe 80e91b5
# Fix link between doc and javadoc
Matt Wringe 80e91b5
pushd doc
896a70e
ln -sf %{_javadocdir}/%{name} api
Matt Wringe 80e91b5
popd
Matt Wringe 80e91b5
Yaakov Selkowitz c7f604d
%files -f .mfiles
13cbd20
%doc LICENSE-ASL
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%files javadoc
13cbd20
%doc LICENSE-ASL
Matt Wringe 80e91b5
%{_javadocdir}/%{name}
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%files doc
Matt Wringe 80e91b5
%doc doc/*
Matt Wringe 80e91b5
Matt Wringe 80e91b5
%changelog
Yaakov Selkowitz c7f604d
* Fri Jun 27 2014 Yaakov Selkowitz <yselkowi@redhat.com> - 0:1.7-15
Yaakov Selkowitz c7f604d
- Fix FTBFS due to xmvn changes (#1106777)
Yaakov Selkowitz c7f604d
7ad9b61
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-14
7ad9b61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7ad9b61
13cbd20
* Wed Sep 18 2013 Michal Srb <msrb@redhat.com> - 0:1.7-13
13cbd20
- Replace non-free XML DTD files
13cbd20
- Drop group tag
13cbd20
- Fix R/BR
13cbd20
- bump spec
13cbd20
5095c49
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-12
5095c49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5095c49
8488316
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-11
8488316
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8488316
Stanislav Ochotnicky c2fe02f
* Mon Nov 12 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7-10
Stanislav Ochotnicky c2fe02f
- BR/R new tomcat servlet
Stanislav Ochotnicky c2fe02f
17e2ce2
* Tue Aug 21 2012 Tomas Radej <tradej@redhat.com> - 0:1.7-9
17e2ce2
- Added POM File
17e2ce2
- Added Requires on jpackage-utils to javadoc package
17e2ce2
77323b3
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-8
77323b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
77323b3
70f3c5d
* Wed Apr 18 2012 Alexander Kurtakov <akurtako@redhat.com> 0:1.7-7
70f3c5d
- Fix build against junit 4.x.
70f3c5d
0059e35
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-6
0059e35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0059e35
896a70e
* Tue Dec 6 2011 Alexander Kurtakov <akurtako@redhat.com> 0:1.7-5
896a70e
- Fix build.
896a70e
- Adapt to current guidelines.
896a70e
f8e149d
* Mon Mar 7 2011 Alexander Kurtakov <akurtako@redhat.com> 0:1.7-4
f8e149d
- Adopt to current guidelines.
f8e149d
- Fix various rpmlint errors/warnings.
f8e149d
953d070
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7-3
953d070
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
953d070
9dd05b5
* Thu Oct 21 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.7-2
9dd05b5
- BR java 1.6.0.
9dd05b5
- Remove jaf from exported classpath.
9dd05b5
eece196
* Wed Oct 20 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.7-1
eece196
- Update to 1.7.
eece196
- Drop demo subpackage - it was never upstream.
eece196
- Use default permissions.
eece196
c52b218
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.2-4
c52b218
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c52b218
58fc8d3
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.2-3
58fc8d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
58fc8d3
63fb6b5
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.6.2-2
63fb6b5
- drop repotag
63fb6b5
Matt Wringe 80e91b5
* Wed Feb 14 2007 Permaine Cheung <pcheung@redhat.com> - 0:1.6.2-1jpp.1
Matt Wringe 80e91b5
- Fixed buildroot, release
Matt Wringe 80e91b5
- Renamed manual subpackage to doc subpackage as per fedora packaging guideline
Matt Wringe 80e91b5
- Got rid of Vendor and Distribution tags.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Mon May 08 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.6.2-1jpp
Matt Wringe 80e91b5
- Upgrade to 1.6.2
Matt Wringe 80e91b5
- First JPP-1.7 release
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Sat Nov 13 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.6-1jpp
Matt Wringe 80e91b5
- Update to 1.6.
Matt Wringe 80e91b5
- Require Servlet API 2.3, ServletUnit doesn't work with 2.4.
Matt Wringe 80e91b5
- Fix classpath construction during build; now works also with classpathx-mail.
Matt Wringe 80e91b5
- Apply upstream patch to build with Java 1.5 (built with 1.4.2 though).
Matt Wringe 80e91b5
- Patch to fix class path in servlet tests during build.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Wed Sep 22 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.5.4-3jpp
Matt Wringe 80e91b5
- Patched JavaScript.java to not handle  NotAFunctionException,
Matt Wringe 80e91b5
  as in Rhino-1.5-R5 this now is deprecated, not thrown any more
Matt Wringe 80e91b5
  and extends Error; also not to handle PropertyException not thrown
Matt Wringe 80e91b5
  any more in that try block 
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Wed Aug 25 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.5.4-2jpp
Matt Wringe 80e91b5
- Build with ant-1.6.2
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Thu Aug 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.5.4-1jpp
Matt Wringe 80e91b5
- Update to 1.5.4.
Matt Wringe 80e91b5
- Save .spec in UTF-8.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Mon May  5 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.5.3-2jpp
Matt Wringe 80e91b5
- Fix non-versioned javadoc symlinking.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Mon Apr 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.5.3-1jpp
Matt Wringe 80e91b5
- Update to 1.5.3 and JPackage 1.5.
Matt Wringe 80e91b5
- Include non-versioned javadoc symlink.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Tue Mar  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 1.5.2-1jpp
Matt Wringe 80e91b5
- Update to 1.5.2.
Matt Wringe 80e91b5
- Run unit tests during build.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Wed Dec 18 2002 Ville Skyttä <ville.skytta at iki.fi> - 1.5.1-1jpp
Matt Wringe 80e91b5
- Update to 1.5.1.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Mon Nov  4 2002 Ville Skyttä <ville.skytta at iki.fi> 1.5-1jpp
Matt Wringe 80e91b5
- Update to 1.5.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Thu Oct  3 2002 Ville Skyttä <ville.skytta at iki.fi> 1.4.6-1jpp
Matt Wringe 80e91b5
- Update to 1.4.6.
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Fri Sep  6 2002 Ville Skyttä <ville.skytta at iki.fi> 1.4.5-0.cvs20020906.1jpp
Matt Wringe 80e91b5
- Update to 1.4.5 (CVS 2002-09-06, CVS version needed since we have JUnit 3.8).
Matt Wringe 80e91b5
- Add requirements.
Matt Wringe 80e91b5
- Add rhino and xerces to build requirements.
Matt Wringe 80e91b5
- Fix/add Distribution, License, Vendor tags.
Matt Wringe 80e91b5
- Use sed instead of bash2 extension when symlinking jars during build.
Matt Wringe 80e91b5
- s/Copyright/License/
Matt Wringe 80e91b5
Matt Wringe 80e91b5
* Tue Jul 16 2002 Henri Gomez <hgomez@users.sourceforge.net> 1.4.1-1jpp
Matt Wringe 80e91b5
- first jpp release