Install with XMvn

This commit is contained in:
Michael Simacek 2017-03-01 14:56:46 +01:00
parent 4ea7466e7f
commit a6390b9098

View File

@ -30,15 +30,14 @@
Name: xmlunit
Version: 1.6
Release: 4%{?dist}
Release: 5%{?dist}
Epoch: 0
Summary: Provides classes to do asserts on xml
License: BSD
Source0: http://downloads.sourceforge.net/xmlunit/xmlunit-1.6-src.zip
Source1: http://repo1.maven.org/maven2/xmlunit/xmlunit/1.0/xmlunit-1.0.pom
URL: http://xmlunit.sourceforge.net/
BuildRequires: jpackage-utils
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: javapackages-local
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: junit
@ -49,7 +48,6 @@ BuildRequires: xml-commons-apis
Requires: junit
Requires: xalan-j2
Requires: xml-commons-apis
Requires: jpackage-utils
BuildArch: noarch
@ -66,56 +64,43 @@ Summary: Javadoc for %{name}
Javadoc for %{name}
%prep
%setup -q
%setup -q
sed -i /java.class.path/d build.xml
# remove all binary libs and javadocs
find . -name "*.jar" -exec rm -f {} \;
rm -rf doc
cat >build.properties <<EOF
junit.lib=$(build-classpath junit)
xmlxsl.lib=
test.report.dir=test
EOF
cat >docbook.properties <<EOF
db5.xsl=%{_datadir}/sgml/docbook/xsl-ns-stylesheets
EOF
#Fix wrong-file-end-of-line-encoding
sed -i 's/\r//g' README.txt LICENSE.txt
%mvn_file : %{name}
%build
ant -Dbuild.compiler=modern -Dhaltonfailure=yes jar javadocs
ant -Dbuild.compiler=modern -Dhaltonfailure=yes \
-Djunit.lib=$(build-classpath junit) \
-Dxmlxsl.lib= -Dtest.report.dir=test \
-Ddb5.xsl=%{_datadir}/sgml/docbook/xsl-ns-stylesheets \
jar javadocs
%mvn_artifact %{SOURCE1} build/lib/%{name}-%{version}.jar
%install
mkdir -p $RPM_BUILD_ROOT%{_javadir}
install -m 0644 build/lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# poms
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# Javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/doc/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%mvn_install -J build/doc/api/
%check
ant
%files -f .mfiles
%doc README.txt LICENSE.txt userguide/XMLUnit-Java.pdf
%doc README.txt LICENSE.txt userguide/XMLUnit-Java.pdf
%files javadoc
%doc %{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%changelog
* Wed Mar 01 2017 Michael Simacek <msimacek@redhat.com> - 0:1.6-5
- Install with XMvn
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild