xmlstreambuffer/xmlstreambuffer.spec

97 lines
3.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package xmlstreambuffer
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: xmlstreambuffer
Version: 2.1.0.a
Release: 0
Summary: XML Stream Buffer
License: CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0
Group: Development/Libraries/Java
URL: https://github.com/eclipse-ee4j/metro-xmlstreambuffer
Source0: https://github.com/eclipse-ee4j/metro-%{name}/archive/refs/tags/%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(jakarta.activation:jakarta.activation-api)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.eclipse.ee4j:project:pom:)
BuildRequires: mvn(org.jvnet.staxex:stax-ex)
BuildArch: noarch
%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.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n metro-%{name}-%{version}
pushd streambuffer
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :glassfish-copyright-maven-plugin
%pom_remove_plugin :buildnumber-maven-plugin
%pom_remove_plugin :build-helper-maven-plugin
%pom_remove_plugin :maven-enforcer-plugin
%{mvn_file} :streambuffer %{name}
popd
%build
pushd streambuffer
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dsource=8
popd
%install
pushd streambuffer
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
popd
%files -f streambuffer/.mfiles
%license LICENSE.md NOTICE.md
%files javadoc -f streambuffer/.mfiles-javadoc
%license LICENSE.md NOTICE.md
%changelog