Files
brotli-java/brotli-java.spec

83 lines
2.5 KiB
RPMSpec

#
# spec file for package brotli-java
#
# Copyright (c) 2025 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: brotli-java
Version: 1.0.9
Release: 0
Summary: Brotli compression format for Java
License: MIT
Group: Development/Libraries/Java
URL: https://github.com/google/brotli
Source0: brotli-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildArch: noarch
%description
Brotli is a generic-purpose lossless compression algorithm that compresses data
using a combination of a modern variant of the LZ77 algorithm, Huffman coding
and 2nd order context modeling, with a compression ratio comparable to the best
currently available general-purpose compression methods. It is similar in speed
with deflate but offers more dense compression.
The specification of the Brotli Compressed Data Format is defined in RFC 7932.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n brotli-%{version}
rm -rf java/org/brotli/wrapper/android
%pom_remove_plugin -r org.sonatype.plugins:nexus-staging-maven-plugin java/org/brotli
%pom_remove_plugin -r :maven-source-plugin java/org/brotli
%pom_remove_plugin -r :maven-javadoc-plugin java/org/brotli
%pom_remove_dep junit:junit java/org/brotli/dec
%pom_add_dep junit:junit java/org/brotli/dec
%{mvn_file} ':{*}' brotli/@1
%build
pushd java/org/brotli
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dmaven.compiler.release=8
popd
%install
pushd java/org/brotli
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
popd
%files -f java/org/brotli/.mfiles
%license LICENSE
%doc README README.md
%files javadoc -f java/org/brotli/.mfiles-javadoc
%license LICENSE
%changelog