2012-01-03 11:18:42 +00:00
|
|
|
#
|
2012-04-03 13:54:47 +00:00
|
|
|
# spec file for package apache-commons-codec
|
2012-01-03 11:18:42 +00:00
|
|
|
#
|
2019-02-05 12:23:12 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-04-03 13:54:47 +00:00
|
|
|
# Copyright (c) 2000-2010, JPackage Project
|
2012-01-03 11:18:42 +00:00
|
|
|
#
|
2012-04-03 13:54:47 +00:00
|
|
|
# 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.
|
|
|
|
|
2018-12-30 14:58:40 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-01-03 11:18:42 +00:00
|
|
|
#
|
|
|
|
|
2012-04-03 13:54:47 +00:00
|
|
|
|
2012-01-03 11:18:42 +00:00
|
|
|
%define base_name codec
|
|
|
|
%define short_name commons-%{base_name}
|
2019-02-15 15:58:13 +00:00
|
|
|
%bcond_with tests
|
2012-01-03 11:18:42 +00:00
|
|
|
Name: apache-commons-codec
|
2019-02-15 15:58:13 +00:00
|
|
|
Version: 1.11
|
2012-02-28 09:57:37 +00:00
|
|
|
Release: 0
|
2012-01-03 11:18:42 +00:00
|
|
|
Summary: Apache Commons Codec Package
|
2012-04-03 13:54:47 +00:00
|
|
|
License: Apache-2.0
|
2012-01-03 11:18:42 +00:00
|
|
|
Group: Development/Libraries/Java
|
2018-12-30 14:58:40 +00:00
|
|
|
URL: http://commons.apache.org/codec/
|
2019-02-15 15:58:13 +00:00
|
|
|
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
|
|
|
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
|
2014-06-23 06:42:10 +00:00
|
|
|
# PATCH-FIX-OPENSUSE Avoid spurious timeout in BeiderMorse tests
|
|
|
|
Patch0: timeout.patch
|
2019-02-15 15:58:13 +00:00
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: dos2unix
|
2018-05-15 07:33:36 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: java-devel >= 1.8
|
2017-05-19 08:44:58 +00:00
|
|
|
BuildRequires: javapackages-local
|
2018-05-15 07:33:36 +00:00
|
|
|
Requires: java >= 1.8
|
2012-01-03 11:18:42 +00:00
|
|
|
Provides: jakarta-%{short_name} = %{version}
|
|
|
|
Obsoletes: jakarta-%{short_name} < %{version}
|
|
|
|
Provides: %{short_name} = %{version}
|
|
|
|
Obsoletes: %{short_name} < %{version}
|
|
|
|
BuildArch: noarch
|
2019-02-15 15:58:13 +00:00
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: ant-junit >= 1.7
|
|
|
|
BuildRequires: apache-commons-lang3
|
|
|
|
BuildRequires: hamcrest-core
|
|
|
|
BuildRequires: junit
|
|
|
|
BuildRequires: mozilla-nss
|
|
|
|
%endif
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Commons Codec is an attempt to provide definitive implementations of
|
|
|
|
commonly used encoders and decoders.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2019-02-15 15:58:13 +00:00
|
|
|
Group: Documentation/HTML
|
2012-01-03 11:18:42 +00:00
|
|
|
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
|
2019-02-15 15:58:13 +00:00
|
|
|
cp %{SOURCE1} build.xml
|
|
|
|
cp %{SOURCE100} aspell-mail.txt
|
2014-06-23 06:42:10 +00:00
|
|
|
%patch0 -p1
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
#fixes eof encoding
|
2019-02-15 15:58:13 +00:00
|
|
|
dos2unix RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt
|
2012-01-03 11:18:42 +00:00
|
|
|
|
2019-03-25 17:24:51 +00:00
|
|
|
%pom_remove_parent .
|
|
|
|
|
2012-01-03 11:18:42 +00:00
|
|
|
%build
|
2019-02-15 15:58:13 +00:00
|
|
|
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 \
|
2018-12-30 15:05:00 +00:00
|
|
|
jar javadoc
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
2019-02-15 15:58:13 +00:00
|
|
|
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
|
2012-01-03 11:18:42 +00:00
|
|
|
# Install pom file
|
2013-08-26 14:10:34 +00:00
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2019-02-15 15:58:13 +00:00
|
|
|
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}"
|
2012-01-03 11:18:42 +00:00
|
|
|
# javadoc
|
2019-02-15 15:58:13 +00:00
|
|
|
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
|
2012-01-03 11:18:42 +00:00
|
|
|
|
2019-02-05 12:23:12 +00:00
|
|
|
%files -f .mfiles
|
2018-12-30 14:58:40 +00:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc RELEASE-NOTES.txt
|
2019-02-15 15:58:13 +00:00
|
|
|
%{_javadir}/%{name}.jar
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
%files javadoc
|
2019-02-15 15:58:13 +00:00
|
|
|
%{_javadocdir}/%{name}
|
2012-01-03 11:18:42 +00:00
|
|
|
|
|
|
|
%changelog
|