apache-commons-collections4/apache-commons-collections4.spec

79 lines
2.4 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2023 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/
#
%define base_name collections4
%define short_name commons-%{base_name}
%bcond_with tests
Name: apache-%{short_name}
Version: 4.4
Release: 0
Summary: Extension of the Java Collections Framework
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://commons.apache.org/proper/commons-collections/
Source0: http://archive.apache.org/dist/commons/collections/source/commons-collections4-%{version}-src.tar.gz
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
BuildArch: noarch
%description
Commons-Collections seek to build upon the JDK classes by providing
new interfaces, implementations and utilities.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%prep
%setup -q -n commons-collections4-%{version}-src
cp %{SOURCE1} build.xml
%build
%{ant} jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc RELEASE-NOTES.txt
%license LICENSE.txt NOTICE.txt
%{_javadir}/%{short_name}.jar
%files javadoc
%license LICENSE.txt NOTICE.txt
%{_javadocdir}/%{name}
%changelog