Merge with upstream

This commit is contained in:
Permaine Cheung 2008-01-21 19:20:48 +00:00
parent 54e2ebb7b3
commit 2f7cab9a55
2 changed files with 73 additions and 13 deletions

6
xmlunit-1.0.pom Normal file
View File

@ -0,0 +1,6 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.0</version>
</project>

View File

@ -1,4 +1,4 @@
# Copyright (c) 2000-2005, JPackage Project
# Copyright (c) 2000-2007, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -28,20 +28,24 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define gcj_support 1
Name: xmlunit
Version: 1.0
Release: 4jpp.1%{?dist}
Release: 5jpp.1%{?dist}
Epoch: 0
Summary: Unit Testing framework for XML
License: BSD Style
Summary: Provides classes to do asserts on xml
License: BSD
Source0: http://download.sourceforge.net/xmlunit/xmlunit1.0.zip
Source1: http://repo1.maven.org/maven2/xmlunit/xmlunit/1.0/xmlunit-1.0.pom
Patch0: xmlunit-build_xml.patch
URL: http://xmlunit.sourceforge.net/
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: ant >= 0:1.6
BuildRequires: ant-junit >= 0:1.6
BuildRequires: ant-nodeps >= 0:1.6
BuildRequires: junit >= 0:3.8
BuildRequires: jpackage-utils >= 0:1.7.3
BuildRequires: java-devel >= 1.4.2
BuildRequires: ant >= 0:1.6.5
BuildRequires: ant-junit
BuildRequires: ant-trax
BuildRequires: junit >= 0:3.8.1
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
@ -50,7 +54,14 @@ Requires: xalan-j2
Requires: xml-commons-apis
Requires: jaxp_parser_impl
Group: Development/Testing
%if ! %{gcj_support}
BuildArch: noarch
%endif
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -73,7 +84,7 @@ find . -name "*.jar" -exec rm -f {} \;
rm -rf doc
cat >build.properties <<EOF
junit.lib=$(build-classpath junit ant/ant-junit xalan-j2)
junit.lib=$(build-classpath junit)
xmlxsl.lib=$(build-classpath xalan-j2 xerces-j2)
test.report.dir=test
EOF
@ -84,8 +95,6 @@ EOF
sed -i 's/\r//g' README.txt example.html LICENSE.txt
%build
export CLASSPATH=$(build-classpath junit ant/ant-junit xalan-j2 \
xalan-j2 xerces-j2)
ant -Dbuild.compiler=modern jar test docs
@ -93,23 +102,60 @@ ant -Dbuild.compiler=modern jar test docs
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p lib/%{name}%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -m 0644 lib/%{name}%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
# Jar versioning
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
# Javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files
%defattr(0644,root,root,0755)
%{_javadir}/*
%doc README.txt LICENSE.txt XMLUnit.pdf example.html
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif
%files javadoc
%defattr(0644,root,root,0755)
@ -117,6 +163,14 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_javadocdir}/%{name}
%changelog
* Thu Jan 17 2008 Permaine Cheung <pcheung@redhat.com> - 0:1.0-5jpp.1
- Update to the same version as upstream
Tue Dec 18 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.0-5jpp
- Add poms and depmap frags
- Make Vendor, Distribution based on macro
- Add gcj_support option
* Mon Mar 12 2007 Permaine Cheung <pcheung@redhat.com> - 0:1.0-4jpp.1
- Add missing BR, patch to build javadoc, and other rpmlint issues