1
0
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 810801 from home:pmonrealgonzalez:branches:Java:packages - Update to version 1.14 * Release 1.14 - 2019-12-30 - Fix: Hex: Allow encoding read-only ByteBuffer. - Fix: Hex: Only use an available ByteBuffer backing array if the length equals the remaining byte count. - Update: MurmurHash3: Deprecate hash64 methods and hash methods accepting a String that use the default encoding. - Fix: BaseNCodec to expand buffer using overflow conscious code. - Fix: Base32/64: Fixed decoding check that all the final trailing bits to discard are zero. - Add: Add MurmurHash3.hash128x64 methods to fix sign extension error during seeding in hash128 methods. - Add: Add MurmurHash3.hash32x86 methods and IncrementalHash32x86 to fix sign extension error in hash32 methods. - Fix: Allow repeat calls to MurmurHash3.IncrementalHash32.end() to generate the same value. - Add: Add RandomAccessFile digest methods #31. - Add: Add Path APIs to org.apache.commons.codec.digest.DigestUtils similar to File APIs. - Add: Add SHA-512/224 and SHA-512/256 to DigestUtils for Java 9 and up. - Add: Add missing note in javadoc when sign extension error is present #34. - Fix: Reliance on default encoding in MurmurHash2 and MurmurHash3. - Update: Don't reload standard Charsets in org.apache.commons.codec.Charsets. - Update: Deprecate Charset constants in org.apache.commons.codec.Charsets in favor of java.nio.charset.StandardCharsets. * Release 1.13 - 2019-07-20 - Fix: ColognePhonetic handles x incorrectly. - Fix: ColognePhonetic does not treat the letter H correctly. - Fix: Reject any decode request for a value that is impossible to encode to for Base32/Base64 rather than blindly decoding. OBS-URL: https://build.opensuse.org/request/show/810801 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-codec?expand=0&rev=45
2020-06-04 05:41:46 +00:00
# Copyright (c) 2020 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
Version: 1.15
Release: 0
Summary: Apache Commons Codec Package
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://commons.apache.org/codec/
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source2: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz.asc
Source1: %{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
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 %{SOURCE1} 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}
install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom
%add_maven_depmap %{short_name}.pom %{short_name}.jar -a "%{short_name}:%{short_name}"
# 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