0f0be2
# Copyright (c) 2000-2007, JPackage Project
0f0be2
# All rights reserved.
0f0be2
#
0f0be2
# Redistribution and use in source and binary forms, with or without
0f0be2
# modification, are permitted provided that the following conditions
0f0be2
# are met:
0f0be2
#
0f0be2
# 1. Redistributions of source code must retain the above copyright
0f0be2
#    notice, this list of conditions and the following disclaimer.
0f0be2
# 2. Redistributions in binary form must reproduce the above copyright
0f0be2
#    notice, this list of conditions and the following disclaimer in the
0f0be2
#    documentation and/or other materials provided with the
0f0be2
#    distribution.
0f0be2
# 3. Neither the name of the JPackage Project nor the names of its
0f0be2
#    contributors may be used to endorse or promote products derived
0f0be2
#    from this software without specific prior written permission.
0f0be2
#
0f0be2
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0f0be2
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0f0be2
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0f0be2
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0f0be2
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0f0be2
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0f0be2
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0f0be2
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0f0be2
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0f0be2
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0f0be2
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0f0be2
#
0f0be2
0f0be2
Name:           xmlunit
0f0be2
Version:        1.4
0f0be2
Release:        6%{?dist}
0f0be2
Epoch:          0
0f0be2
Summary:        Provides classes to do asserts on xml
0f0be2
License:        BSD
0f0be2
Source0:        http://downloads.sourceforge.net/project/xmlunit/xmlunit%20for%20Java/XMLUnit%20for%20Java%201.4/xmlunit-1.4-src.zip
0f0be2
Source1:        http://repo1.maven.org/maven2/xmlunit/xmlunit/1.0/xmlunit-1.0.pom
0f0be2
URL:            http://xmlunit.sourceforge.net/
0f0be2
BuildRequires:  jpackage-utils
0f0be2
BuildRequires:  java-devel >= 1:1.6.0
0f0be2
BuildRequires:  ant
0f0be2
BuildRequires:  ant-junit
0f0be2
BuildRequires:  junit
0f0be2
BuildRequires:  xalan-j2
0f0be2
BuildRequires:  xerces-j2
0f0be2
BuildRequires:  xml-commons-apis
0f0be2
0f0be2
Requires:       junit
0f0be2
Requires:       xalan-j2
0f0be2
Requires:       xml-commons-apis
0f0be2
Requires:       jpackage-utils
0f0be2
0f0be2
BuildArch:      noarch
0f0be2
0f0be2
%description
0f0be2
XMLUnit extends JUnit to simplify unit testing of XML. It compares a control
0f0be2
XML document to a test document or the result of a transformation, validates
0f0be2
documents against a DTD, and (from v0.5) compares the results of XPath
0f0be2
expressions.
0f0be2
0f0be2
%package        javadoc
0f0be2
Summary:        Javadoc for %{name}
0f0be2
0f0be2
%description    javadoc
0f0be2
Javadoc for %{name}
0f0be2
0f0be2
%prep
0f0be2
%setup -q 
0f0be2
sed -i /java.class.path/d build.xml
0f0be2
# remove all binary libs and javadocs
0f0be2
find . -name "*.jar" -exec rm -f {} \;
0f0be2
rm -rf doc
0f0be2
0f0be2
cat >build.properties <
0f0be2
junit.lib=$(build-classpath junit)
0f0be2
xmlxsl.lib=
0f0be2
test.report.dir=test
0f0be2
EOF
0f0be2
0f0be2
cat >docbook.properties <
0f0be2
db5.xsl=%{_datadir}/sgml/docbook/xsl-ns-stylesheets
0f0be2
EOF
0f0be2
0f0be2
#Fix wrong-file-end-of-line-encoding
0f0be2
sed -i 's/\r//g' README.txt LICENSE.txt
0f0be2
0f0be2
%build
0f0be2
ant -Dbuild.compiler=modern -Dhaltonfailure=yes jar javadocs
0f0be2
0f0be2
%install
0f0be2
0f0be2
mkdir -p $RPM_BUILD_ROOT%{_javadir}
0f0be2
install -m 0644 build/lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
0f0be2
0f0be2
# poms
0f0be2
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
0f0be2
0f0be2
install -m 644 %{SOURCE1} \
0f0be2
    $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
0f0be2
0f0be2
%add_maven_depmap
0f0be2
0f0be2
# Javadoc
0f0be2
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
0f0be2
cp -pr build/doc/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
0f0be2
0f0be2
%check
0f0be2
ant
0f0be2
0f0be2
%files -f .mfiles
0f0be2
%doc README.txt LICENSE.txt userguide/XMLUnit-Java.pdf 
0f0be2
0f0be2
%files javadoc
0f0be2
%doc %{_javadocdir}/%{name}
0f0be2
0f0be2
%changelog
0f0be2
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 01.4-6
0f0be2
- Mass rebuild 2013-12-27
0f0be2
0f0be2
* Fri Sep 27 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.4-5
0f0be2
- Enable test suite
0f0be2
- Resolves: rhbz#987412
0f0be2
0f0be2
* Fri Jul 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.4-4
0f0be2
- Remove workaround for rpm bug #646523
0f0be2
0f0be2
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.4-3
0f0be2
- Rebuild to regenerate API documentation
0f0be2
- Resolves: CVE-2013-1571
0f0be2
0f0be2
* Wed Jun 12 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.4-2
0f0be2
- Update to latest packaging guidelines
0f0be2
- Cleanup BuildRequires
0f0be2
0f0be2
* Fri Feb 15 2013 Dr. Tilmann Bubeck <t.bubeck@reinform.de> - 0:1.4-1
0f0be2
- update to upstream's xmlunit-1.4
0f0be2
0f0be2
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3-7
0f0be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0f0be2
0f0be2
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3-6
0f0be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0f0be2
0f0be2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3-5
0f0be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0f0be2
0f0be2
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.3-4
0f0be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0f0be2
0f0be2
* Thu Dec 30 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.3-3
0f0be2
- Build javadoc only.
0f0be2
0f0be2
* Thu Dec 30 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.3-2
0f0be2
- BR java 1.6 to prevent gcj failure.
0f0be2
0f0be2
* Thu Dec 30 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.3-1
0f0be2
- Update to new upstream.
0f0be2
- Drop gcj.
0f0be2
- Rebuild docs.
0f0be2
0f0be2
* Thu Mar 11 2010 Peter Lemenkov <lemenkov@gmail.com> - 0:1.0-8.3
0f0be2
- Added missing Requires jpackage-utils
0f0be2
0f0be2
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.0-8.2
0f0be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0f0be2
0f0be2
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.0-7.2
0f0be2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0f0be2
0f0be2
* Thu Jul 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.0-6.2
0f0be2
- drop repotag
0f0be2
0f0be2
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:1.0-6jpp.1
0f0be2
- Autorebuild for GCC 4.3
0f0be2
0f0be2
* Thu Jan 17 2008 Permaine Cheung <pcheung@redhat.com> - 0:1.0-5jpp.1
0f0be2
- Update to the same version as upstream
0f0be2
0f0be2
 Tue Dec 18 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.0-5jpp
0f0be2
- Add poms and depmap frags
0f0be2
- Make Vendor, Distribution based on macro
0f0be2
- Add gcj_support option
0f0be2
0f0be2
* Mon Mar 12 2007 Permaine Cheung <pcheung@redhat.com> - 0:1.0-4jpp.1
0f0be2
- Add missing BR, patch to build javadoc, and other rpmlint issues
0f0be2
0f0be2
* Mon May 08 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.0-4jpp
0f0be2
- First JPP-1.7 release
0f0be2
0f0be2
* Thu Aug 26 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.0-3jpp
0f0be2
- Build with ant-1.6.2
0f0be2
0f0be2
* Wed Dec 17 2003 Paul Nasrat <pauln at truemesh.com> - 0:1.0-2jpp
0f0be2
- Fix license and improved description
0f0be2
- Thanks to Ralph Apel who produced a spec - merged version info
0f0be2
0f0be2
* Wed Dec 17 2003 Paul Nasrat <pauln at truemesh.com> - 0:1.0-1jpp
0f0be2
- Initial Version