update to version 1.5.9

This commit is contained in:
Fabio Valentini 2020-08-11 14:10:14 +02:00
commit fbe9cd4ec0
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF
4 changed files with 50 additions and 338 deletions

View file

@ -1,94 +1,67 @@
Name: xmlstreambuffer
Version: 1.5.4
Release: 15%{?dist}
Summary: XML Stream Buffer
License: CDDL-1.1 or GPLv2 with exceptions
Url: http://java.net/projects/xmlstreambuffer/
# svn export https://svn.java.net/svn/xmlstreambuffer~svn/tags/streambuffer-1.5.4/ xmlstreambuffer-1.5.4
# find xmlstreambuffer-1.5.4/ -name '*.class' -delete
# find xmlstreambuffer-1.5.4/ -name '*.jar' -delete
# find xmlstreambuffer-1.5.4/ -name '*.zip' -delete
# tar cJf xmlstreambuffer-1.5.4.tar.xz xmlstreambuffer-1.5.4
Source0: %{name}-%{version}.tar.xz
# wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt
# xmlstreambuffer package don't include the license file
Source1: glassfish-LICENSE.txt
%global srcname metro-xmlstreambuffer
BuildRequires: jvnet-parent
BuildRequires: maven-local
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-plugin-bundle
BuildRequires: maven-surefire-provider-junit
BuildRequires: stax-ex >= 1.7.1
# test deps
BuildRequires: junit
BuildRequires: woodstox-core
Name: xmlstreambuffer
Version: 1.5.9
Release: 1%{?dist}
Summary: Stream Based Representation for XML Infoset
License: BSD
BuildArch: noarch
URL: https://github.com/eclipse-ee4j/metro-xmlstreambuffer
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: mvn(com.fasterxml.woodstox:woodstox-core)
BuildRequires: mvn(jakarta.activation:jakarta.activation-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.jvnet.staxex:stax-ex)
# javadoc subpackage is currently not built
Obsoletes: xmlstreambuffer-javadoc < 1.5.9-1
%description
A stream buffer is a stream-based representation of an XML
info-set in Java. Stream buffers are designed to: provide
very efficient stream-based memory representations of XML
info-sets; and be created and processed using any Java-based
XML API.
Conceptually a stream buffer is similar to the representation
used in the Xerces deferred DOM implementation, with the crucial
difference that a stream buffer does not store hierarchical
information like parent and sibling information. The deferred
DOM implementation reduces memory usage when large XML documents
are parsed but only a subset of the document needs to be processed.
(Note that using deferred DOM will be more expensive than
non-deferred DOM in terms of memory and processing if all
the document is traversed.)
Stream buffers may be used as an efficient alternative to DOM where:
* most or all of an XML info-set will eventually get traversed; and/or
* targeted access to certain parts of an XML info-set are required
and need to be efficiently processed using stream-based APIs like
SAX or StAX.
Stream based representation for XML infoset.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q
%setup -q -n %{srcname}-%{version}
%pom_remove_plugin :maven-deploy-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :findbugs-maven-plugin
%pom_remove_plugin :glassfish-copyright-maven-plugin
%pom_remove_plugin :cobertura-maven-plugin
pushd streambuffer
# remove unnecessary dependency on parent POM
%pom_remove_parent
# remove unnecessary maven plugins
%pom_remove_plugin :buildnumber-maven-plugin
%pom_remove_plugin :glassfish-copyright-maven-plugin
%pom_remove_plugin :maven-enforcer-plugin
popd
%pom_xpath_set "pom:dependency[pom:groupId = 'org.codehaus.woodstox']/pom:artifactId" woodstox-core-asl
cp -p %{SOURCE1} LICENSE.txt
sed -i 's/\r//' LICENSE.txt
rm -r test/com/sun/xml/stream/buffer/stax/InscopeNamespaceTest.java
# Don't hard-code compiler configuration
%pom_remove_plugin :maven-compiler-plugin
%mvn_file :streambuffer %{name}
%build
%mvn_build
pushd streambuffer
# skip javadoc build due to https://github.com/fedora-java/xmvn/issues/58
%mvn_build -j -- -DbuildNumber=unknown
popd
%install
pushd streambuffer
%mvn_install
popd
%files -f .mfiles
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%files -f streambuffer/.mfiles
%license LICENSE.md NOTICE.md
%doc README.md
%changelog
* Tue Aug 11 2020 Fabio Valentini <decathorpe@gmail.com> - 1.5.9-1
- Update to version 1.5.9.
* Fri Aug 07 2020 Mat Booth <mat.booth@redhat.com> - 1.5.4-15
- Allow building on JDK 11 and correct license tag
@ -156,3 +129,4 @@ rm -r test/com/sun/xml/stream/buffer/stax/InscopeNamespaceTest.java
* Sat Mar 31 2012 gil cattaneo <puntogil@libero.it> 1.4-1
- initial rpm