apache-commons-codec/apache-commons-codec.spec

121 lines
3.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package apache-commons-codec
#
Accepting request 1118584 from home:david.anes:branches:Java:packages - Update to 1.16.0: * Minor improvements #67. Fixes CODEC-295. * Remove duplicated words from Javadocs. * Simplify assertion #84. Fixes CODEC-301. * Simplify assertion #84. Fixes CODEC-300. * Use Standard Charset object #82. Fixes CODEC-298. * Use String.contains() functions #125. * Avoid use toString() or substring() in favor of a simplified expression #126. * Fix byte-skipping in Base16 decoding #135. Fixes CODEC-305. * Fix several typos, improve writing in some javadocs #139. * BaseNCodecOutputStream.eof() should not throw IOException. * Javadoc improvements and cleanups. * Deprecate BaseNCodec.isWhiteSpace(byte) and use Character.isWhitespace(int). * Add support for Blake3 family of hashes. Fixes CODEC-296. * Add github/codeql-action. * Bump actions/cache from v2 to v3.0.10 #75, #99, #119, #138, #149, #152. * Bump actions/setup-java from v1.4.1 to 3.5.1 #60, #62, #121. * Bump actions/checkout from 2.3.2 to 3.1.0 #65, #98, #114, #153. * Bump commons-parent from 52 to 58, #147, #165, #170. * Bump junit from 4.13.1 to 5.9.1 #76, #39, #140, #148. Fixes CODEC-285. * Bump Java 7 to 8. * Bump japicmp-maven-plugin from 0.14.3 to 0.17.1. * Bump jacoco-maven-plugin from 0.8.5 to 0.8.8 (Fixes Java 15 builds). * Bump maven-surefire-plugin from 2.22.2 to 3.0.0-M7 #122, #134. * Bump maven-javadoc-plugin from 3.2.0 to 3.4.1. * Bump animal-sniffer-maven-plugin from 1.19 to 1.22. * Bump maven-pmd-plugin from 3.13.0 to 3.19.0, #133, #142, #145. * Bump pmd from 6.47.0 to 6.52.0. * Bump maven-checkstyle-plugin from 2.17 to 3.2.0 #143. * Bump checkstyle from 8.45.1 to 9.3 #97, #100, #101, #103. OBS-URL: https://build.opensuse.org/request/show/1118584 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-codec?expand=0&rev=53
2023-10-18 14:51:42 +02:00
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2000-2010, JPackage Project
#
# 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 codec
%define short_name commons-%{base_name}
%bcond_with tests
Name: apache-commons-codec
Accepting request 1118584 from home:david.anes:branches:Java:packages - Update to 1.16.0: * Minor improvements #67. Fixes CODEC-295. * Remove duplicated words from Javadocs. * Simplify assertion #84. Fixes CODEC-301. * Simplify assertion #84. Fixes CODEC-300. * Use Standard Charset object #82. Fixes CODEC-298. * Use String.contains() functions #125. * Avoid use toString() or substring() in favor of a simplified expression #126. * Fix byte-skipping in Base16 decoding #135. Fixes CODEC-305. * Fix several typos, improve writing in some javadocs #139. * BaseNCodecOutputStream.eof() should not throw IOException. * Javadoc improvements and cleanups. * Deprecate BaseNCodec.isWhiteSpace(byte) and use Character.isWhitespace(int). * Add support for Blake3 family of hashes. Fixes CODEC-296. * Add github/codeql-action. * Bump actions/cache from v2 to v3.0.10 #75, #99, #119, #138, #149, #152. * Bump actions/setup-java from v1.4.1 to 3.5.1 #60, #62, #121. * Bump actions/checkout from 2.3.2 to 3.1.0 #65, #98, #114, #153. * Bump commons-parent from 52 to 58, #147, #165, #170. * Bump junit from 4.13.1 to 5.9.1 #76, #39, #140, #148. Fixes CODEC-285. * Bump Java 7 to 8. * Bump japicmp-maven-plugin from 0.14.3 to 0.17.1. * Bump jacoco-maven-plugin from 0.8.5 to 0.8.8 (Fixes Java 15 builds). * Bump maven-surefire-plugin from 2.22.2 to 3.0.0-M7 #122, #134. * Bump maven-javadoc-plugin from 3.2.0 to 3.4.1. * Bump animal-sniffer-maven-plugin from 1.19 to 1.22. * Bump maven-pmd-plugin from 3.13.0 to 3.19.0, #133, #142, #145. * Bump pmd from 6.47.0 to 6.52.0. * Bump maven-checkstyle-plugin from 2.17 to 3.2.0 #143. * Bump checkstyle from 8.45.1 to 9.3 #97, #100, #101, #103. OBS-URL: https://build.opensuse.org/request/show/1118584 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-codec?expand=0&rev=53
2023-10-18 14:51:42 +02:00
Version: 1.16.0
Release: 0
Summary: Apache Commons Codec Package
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://commons.apache.org/codec/
Source0: https://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source1: https://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
Source2: %{name}-build.xml
# Data in DoubleMetaphoneTest.java originally has an inadmissible license.
# The author gives MIT in e-mail communication.
Source100: aspell-mail.txt
BuildRequires: ant
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local >= 6
Requires: java >= 1.8
Provides: jakarta-%{short_name} = %{version}
Obsoletes: jakarta-%{short_name} < %{version}
Provides: %{short_name} = %{version}
Obsoletes: %{short_name} < %{version}
BuildArch: noarch
%if %{with tests}
BuildRequires: ant-junit >= 1.7
BuildRequires: apache-commons-lang3
BuildRequires: hamcrest-core
BuildRequires: junit
BuildRequires: mozilla-nss
%endif
%description
Commons Codec is an attempt to provide definitive implementations of
commonly used encoders and decoders.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
Provides: jakarta-%{short_name}-javadoc = %{version}
Obsoletes: jakarta-%{short_name}-javadoc < %{version}
Provides: %{short_name}-javadoc = %{version}
Obsoletes: %{short_name}-javadoc < %{version}
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -n %{short_name}-%{version}-src
cp %{SOURCE2} build.xml
cp %{SOURCE100} aspell-mail.txt
#fixes eof encoding
dos2unix RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt
%pom_remove_parent .
%build
mkdir -p lib
%if %{with tests}
build-jar-repository -s lib junit4 hamcrest/core commons-lang3
%endif
ant \
%if %{without tests}
-Dtest.skip=true \
%endif
-Dcompiler.source=1.8 -Dcompiler.target=1.8 \
jar javadoc
%install
# jars
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar
ln -sf %{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar
# poms
# Install pom file
install -d -m 755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom
%add_maven_depmap %{short_name}.pom %{short_name}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%pre javadoc
if [ -L %{_javadocdir}/%{name} ]; then
rm -f %{_javadocdir}/%{name};
fi
%files -f .mfiles
%license LICENSE.txt
%doc RELEASE-NOTES.txt
%{_javadir}/%{name}.jar
%files javadoc
%{_javadocdir}/%{name}
%changelog