%global url     https://github.com/tdunning/%{name}

Name:                t-digest
Version:             3.2
Release:             1
Summary:             A new data structure for on-line accumulation of statistics
License:             ASL 2.0
URL:                 https://github.com/tdunning/t-digest
Source0:             %{url}/archive/%{name}-%{version}.tar.gz
Patch0:              sourceTarget.patch

BuildArch:           noarch
BuildRequires:       maven-local
Requires:            java

%description
A new data structure for accurate on-line accumulation of rank-based statistics
eg. quantiles and trimmed means. The t-digest algorithm is also very parallel
friendly making it useful in map-reduce and parallel streaming applications.

%package        javadoc
Summary:        Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q -n %{name}-%{name}-%{version}
%patch0
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_plugin :maven-release-plugin
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin com.carrotsearch.randomizedtesting

%build
%mvn_build  --force

%install
%mvn_install

%files -f .mfiles
%doc README.md
%license LICENSE NOTICES

%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICES

%changelog
* Thu Jul 28 2022 fushanqing <fushanqing@kylinos.cn> - 3.2-1
- Update to 3.2

* Mon Jul 27 2020 maminjie <maminjie1@huawei.com> - 3.0-1
- package init
