Files
roaringbitmap/roaringbitmap.spec

88 lines
3.0 KiB
RPMSpec

#
# spec file for package roaringbitmap
#
# 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/
#
# The automatic requires would be java-headless >= 9, but the
# binaries are java 8 compatible
%define __requires_exclude java-headless
%global artifact_name RoaringBitmap
Name: roaringbitmap
Version: 1.3.0
Release: 0
Summary: A better compressed bitset in Java
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://roaringbitmap.org/
Source0: https://github.com/%{artifact_name}/%{artifact_name}/archive/refs/tags/%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/org/roaringbitmap/%{artifact_name}/%{version}/%{artifact_name}-%{version}.pom
Source2: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 9
BuildRequires: javapackages-local >= 6
Requires: java-headless >= 1.8
BuildArch: noarch
%description
Bitsets, also called bitmaps, are commonly used as fast data structures.
Unfortunately, they can use too much memory. To compensate, we often use
compressed bitmaps.
Roaring bitmaps are compressed bitmaps which tend to outperform conventional
compressed bitmaps such as WAH, EWAH or Concise. In some instances, roaring
bitmaps can be hundreds of times faster and they often offer significantly
better compression. They can even be faster than uncompressed bitmaps.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{artifact_name}-%{version}
cp %{SOURCE2} %{artifact_name}/build.xml
%build
pushd %{artifact_name}
ant jar javadoc
popd
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 %{artifact_name}/target/%{artifact_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{artifact_name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
%{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}/%{artifact_name}.pom
%add_maven_depmap %{name}/%{artifact_name}.pom %{name}/%{artifact_name}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr %{artifact_name}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE*
%doc AUTHORS README.md
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE*
%changelog