# # spec file for package essentials # # 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/ # %global base_ver 3.1.0 %global git_hash d81a533 %global git_date 20201104 Name: essentials Version: %{base_ver}+git%{git_date}.%{git_hash} Release: 0 Summary: General purpose utilities and hash functions for Android and Java License: Apache-2.0 Group: Development/Libraries/Java URL: https://github.com/greenrobot/%{name} Source0: %{url}/tarball/%{git_hash}#/%{name}-%{version}.tar.gz BuildRequires: fdupes BuildRequires: maven-local BuildArch: noarch %description Essentials are a collection of general-purpose classes we found useful in many occasions. • Beats standard Java API performance, e.g. LongHashMap can be twice as fast as HashMap. • Adds missing pieces without pulling in heavy-weights like Guava • Improved convenience: do more with less code • Super lightweight: < 100k in size • Compatible with Android and Java This project is bare bones compared to a rich menu offered by Guava or Apache Commons. Essentials is not a framework, it’s rather a small set of utilities to make Java standard approaches more convenient or more efficient. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML %description javadoc API documentation for %{name}. %prep %setup -q -n greenrobot-%{name}-%{git_hash} %pom_remove_parent java-%{name} %pom_xpath_inject pom:project 'org.greenrobot' java-%{name} %pom_xpath_replace 'pom:project/pom:version/text()' %{base_ver} java-%{name} %pom_disable_module checkstyle-rules build-common %pom_disable_module parent-pom-with-checks.xml build-common %pom_xpath_remove 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration' \ build-common/parent-pom.xml %pom_xpath_remove 'pom:extension[pom:artifactId="wagon-webdav-jackrabbit"]' \ build-common/parent-pom.xml %pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin java-%{name} %pom_remove_plugin :maven-source-plugin java-%{name} %pom_remove_plugin :maven-javadoc-plugin java-%{name} %{mvn_file} : %{name} %build %{mvn_build} -f -- \ -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) %install %{mvn_package} ':*-modules' __noinstall %{mvn_package} ':parent-pom' __noinstall %mvn_install %fdupes %{buildroot}%{_javadocdir}/%{name} %files -f .mfiles %license LICENSE %doc README.md %files javadoc -f .mfiles-javadoc %license LICENSE %changelog