File libdivide4j.spec of Package libdivide4j

#
# spec file for package libdivide4j
#
# Copyright (c) 2021 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:           libdivide4j
Version:        1.2
Release:        0
Summary:        Optimized integer division for Java
License:        Apache-2.0
Group:          Development/Libraries/Java
URL:            https://github.com/PoslavskySV/%{name}
Source0:        %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        http://www.apache.org/licenses/LICENSE-2.0.txt
Source2:        %{name}-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  java-javadoc
BuildRequires:  maven-local
BuildRequires:  mvn(org.apache.commons:commons-math3)
BuildRequires:  mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildRequires:  mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch:      noarch

%description
Optimized integer division for Java. This is a Java fork of C/C++ libdivide
library for fast integer division (http://libdivide.com and
https://github.com/ridiculousfish/libdivide). Fast division by constant divisor
is about 2-3 times faster then ordinary Java divide operation on most of modern
CPUs.

%package javadoc
Summary:        API documentation for %{name}

%description javadoc
API documentation for %{name}.

%prep
%setup -q
cp %{SOURCE1} LICENSE.txt
%pom_xpath_remove "pom:parent/pom:relativePath" pom.xml
%{mvn_file} : %{name}

%build
%{mvn_build} -- -Dsource=8

%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}/%{name}

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

%files javadoc -f .mfiles-javadoc
%doc README.md
%license LICENSE.txt

%changelog
openSUSE Build Service is sponsored by