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