2013-02-05 13:54:40 +01:00
|
|
|
#
|
|
|
|
# spec file for package apache-commons-httpclient
|
|
|
|
#
|
2020-11-02 15:43:49 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2013-02-05 13:54:40 +01: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-11-19 09:38:32 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-02-05 13:54:40 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define short_name commons-httpclient
|
|
|
|
Name: apache-commons-httpclient
|
|
|
|
Version: 3.1
|
|
|
|
Release: 0
|
|
|
|
Summary: Feature rich package for accessing resources via HTTP
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/Java
|
2018-11-19 09:38:32 +01:00
|
|
|
URL: http://hc.apache.org/httpclient-3.x/
|
|
|
|
Source0: http://www.apache.org/dist/httpcomponents/commons-httpclient/source/%{short_name}-%{version}-src.tar.gz
|
|
|
|
Source1: http://repo.maven.apache.org/maven2/%{short_name}/%{short_name}/%{version}/%{short_name}-%{version}.pom
|
2013-02-05 13:54:40 +01:00
|
|
|
Patch0: %{name}-disablecryptotests.patch
|
|
|
|
# Add OSGi MANIFEST.MF bits
|
|
|
|
Patch1: %{name}-addosgimanifest.patch
|
|
|
|
Patch2: %{name}-encoding.patch
|
2013-02-14 10:26:33 +01:00
|
|
|
#PATCH-FIX-UPSTREAM: bnc#803332
|
2013-03-28 12:03:10 +01:00
|
|
|
#https://issues.apache.org/jira/secure/attachment/12560251/CVE-2012-5783-2.patch
|
2018-11-19 09:38:32 +01:00
|
|
|
Patch3: %{short_name}-CVE-2012-5783-2.patch
|
2020-11-02 15:43:49 +01:00
|
|
|
#PATCH-FIX-UPSTREAM bsc#1178171 CVE-2014-3577 MITM security vulnerability
|
|
|
|
Patch4: apache-commons-httpclient-CVE-2014-3577.patch
|
|
|
|
#PATCH-FIX-UPSTREAM bsc#945190 CVE-2015-5262 Missing HTTPS connection timeout
|
|
|
|
Patch5: apache-commons-httpclient-CVE-2015-5262.patch
|
2013-02-05 13:54:40 +01:00
|
|
|
BuildRequires: ant
|
2013-10-25 10:31:37 +02:00
|
|
|
BuildRequires: ant-junit
|
2013-02-05 13:54:40 +01:00
|
|
|
BuildRequires: commons-codec
|
|
|
|
BuildRequires: commons-logging >= 1.0.3
|
2018-05-15 12:35:21 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: java-devel >= 1.8
|
2018-11-19 09:38:32 +01:00
|
|
|
BuildRequires: javapackages-local
|
2013-02-05 13:54:40 +01:00
|
|
|
BuildRequires: junit
|
|
|
|
Requires: commons-codec
|
|
|
|
Requires: commons-logging >= 1.0.3
|
2013-04-03 10:58:04 +02:00
|
|
|
Provides: %{short_name} = %{version}
|
|
|
|
Provides: jakarta-%{short_name} = %{version}
|
2018-05-15 12:35:21 +02:00
|
|
|
Obsoletes: jakarta-%{short_name} < %{version}
|
2013-04-03 10:58:04 +02:00
|
|
|
Provides: jakarta-%{short_name}3 = %{version}
|
2018-05-15 12:35:21 +02:00
|
|
|
Obsoletes: jakarta-%{short_name}3 < %{version}
|
2014-07-08 10:24:36 +02:00
|
|
|
BuildArch: noarch
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Although the java.net package provides basic functionality for
|
|
|
|
accessing resources via HTTP, it doesn't provide the full flexibility
|
|
|
|
or functionality needed by many applications. The Apache Commons
|
2019-04-02 07:03:48 +02:00
|
|
|
HttpClient component provides a package implementing the client side
|
|
|
|
of the most recent HTTP standards and recommendations.
|
2013-02-05 13:54:40 +01:00
|
|
|
|
2019-04-02 07:03:48 +02:00
|
|
|
The HttpClient component may be of interest to anyone building
|
|
|
|
HTTP-aware client applications such as web browsers, web service
|
|
|
|
clients, or systems that leverage or extend the HTTP protocol for
|
|
|
|
distributed communication.
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%package javadoc
|
2018-11-19 09:38:32 +01:00
|
|
|
Summary: Developer documentation for %{name}
|
2013-02-05 13:54:40 +01:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
2018-11-19 09:38:32 +01:00
|
|
|
Developer documentation for %{name} in JavaDoc
|
2013-02-05 13:54:40 +01:00
|
|
|
format.
|
|
|
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%package demo
|
2018-11-19 09:38:32 +01:00
|
|
|
Summary: Demonstration files for %{name}
|
2013-02-05 13:54:40 +01:00
|
|
|
Group: Development/Libraries/Java
|
2013-04-03 10:58:04 +02:00
|
|
|
Requires: %{name} = %{version}
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%description demo
|
2018-11-19 09:38:32 +01:00
|
|
|
Demonstration files for %{name}. NOTE: It is
|
2013-02-05 13:54:40 +01:00
|
|
|
possible that some demonstration files are specially prepared for SUN
|
|
|
|
Java runtime environment. If they fail with IBM or BEA Java, the
|
|
|
|
package itself does not need to be broken.
|
|
|
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%package manual
|
2018-11-19 09:38:32 +01:00
|
|
|
Summary: Manual for %{name}
|
2013-02-05 13:54:40 +01:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description manual
|
2018-11-19 09:38:32 +01:00
|
|
|
Manual for %{name}
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%prep
|
2018-11-19 09:38:32 +01:00
|
|
|
%setup -q -n %{short_name}-%{version}
|
2013-02-05 13:54:40 +01:00
|
|
|
mkdir lib # duh
|
|
|
|
rm -rf docs/apidocs docs/*.patch docs/*.orig docs/*.rej
|
|
|
|
|
|
|
|
%patch0
|
|
|
|
|
|
|
|
pushd src/conf
|
2014-07-08 10:24:36 +02:00
|
|
|
sed -i 's/\r//' MANIFEST.MF
|
2013-02-05 13:54:40 +01:00
|
|
|
%patch1
|
|
|
|
popd
|
|
|
|
|
|
|
|
%patch2
|
2013-10-25 10:31:37 +02:00
|
|
|
%patch3 -p1
|
2020-11-02 15:43:49 +01:00
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
# Use javax classes, not com.sun ones
|
|
|
|
# assume no filename contains spaces
|
|
|
|
pushd src
|
|
|
|
for j in $(find . -name "*.java" -exec grep -l 'com\.sun\.net\.ssl' {} \;); do
|
|
|
|
sed -e 's|com\.sun\.net\.ssl|javax.net.ssl|' $j > tempf
|
|
|
|
cp tempf $j
|
|
|
|
done
|
|
|
|
rm tempf
|
|
|
|
popd
|
|
|
|
|
2014-07-08 10:24:36 +02:00
|
|
|
sed -i 's/\r//' RELEASE_NOTES.txt
|
|
|
|
sed -i 's/\r//' README.txt
|
|
|
|
sed -i 's/\r//' LICENSE.txt
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
ant \
|
2018-05-15 12:35:21 +02:00
|
|
|
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
2013-02-05 13:54:40 +01:00
|
|
|
-Dbuild.sysclasspath=first \
|
|
|
|
-Djavadoc.j2sdk.link=%{_javadocdir}/java \
|
|
|
|
-Djavadoc.logging.link=%{_javadocdir}/apache-commons-logging \
|
|
|
|
-Dtest.failonerror=false \
|
|
|
|
-Dlib.dir=%{_javadir} \
|
|
|
|
-Djavac.encoding=UTF-8 \
|
|
|
|
dist test
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
2014-07-08 10:24:36 +02:00
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
2018-11-19 09:38:32 +01:00
|
|
|
cp -p dist/%{short_name}.jar \
|
2014-07-08 10:24:36 +02:00
|
|
|
%{buildroot}%{_javadir}/%{name}.jar
|
2013-02-05 13:54:40 +01:00
|
|
|
# compat symlink
|
2014-07-08 10:24:36 +02:00
|
|
|
pushd %{buildroot}%{_javadir}
|
2018-11-19 09:38:32 +01:00
|
|
|
ln -s %{name}.jar %{name}3.jar
|
|
|
|
ln -s %{name}.jar %{short_name}3.jar
|
|
|
|
ln -s %{name}.jar %{short_name}.jar
|
|
|
|
ln -s %{name}.jar jakarta-%{short_name}.jar
|
|
|
|
ln -s %{name}.jar jakarta-%{short_name}3.jar
|
2013-02-05 13:54:40 +01:00
|
|
|
popd
|
|
|
|
|
2018-11-19 09:38:32 +01:00
|
|
|
# pom
|
|
|
|
mkdir -p %{buildroot}%{_mavenpomdir}
|
|
|
|
cp -p %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}.pom
|
|
|
|
%add_maven_depmap %{name}.pom %{name}.jar -a apache:commons-httpclient
|
|
|
|
|
2013-02-05 13:54:40 +01:00
|
|
|
# javadoc
|
2014-07-08 10:24:36 +02:00
|
|
|
mkdir -p %{buildroot}%{_javadocdir}
|
|
|
|
mv dist/docs/api %{buildroot}%{_javadocdir}/%{name}
|
2018-05-15 12:35:21 +02:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
# demo
|
2014-07-08 10:24:36 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr src/examples src/contrib %{buildroot}%{_datadir}/%{name}
|
2018-05-15 12:35:21 +02:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
# manual and docs
|
|
|
|
rm -f dist/docs/{BUILDING,TESTING}.txt
|
|
|
|
ln -s %{_javadocdir}/%{name} dist/docs/apidocs
|
2018-05-15 12:35:21 +02:00
|
|
|
%fdupes -s dist/docs
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
2018-11-19 09:38:32 +01:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.txt RELEASE_NOTES.txt
|
2013-02-05 13:54:40 +01:00
|
|
|
%{_javadir}/%{name}.jar
|
2018-11-19 09:38:32 +01:00
|
|
|
%{_javadir}/%{name}3.jar
|
|
|
|
%{_javadir}/%{short_name}3.jar
|
|
|
|
%{_javadir}/%{short_name}.jar
|
|
|
|
%{_javadir}/jakarta-%{short_name}3.jar
|
|
|
|
%{_javadir}/jakarta-%{short_name}.jar
|
|
|
|
%{_mavenpomdir}/*
|
|
|
|
%if %{defined _maven_repository}
|
|
|
|
%{_mavendepmapfragdir}/%{name}
|
|
|
|
%else
|
|
|
|
%{_datadir}/maven-metadata/%{name}.xml*
|
|
|
|
%endif
|
2013-02-05 13:54:40 +01:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc %{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc dist/docs/*
|
|
|
|
|
|
|
|
%changelog
|