LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File jakarta-commons-httpclient3.spec of Package jakarta-commons-httpclient3 (Project Java:base)

# spec file for package jakarta-commons-httpclient3 (Version 3.0.1)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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 http://bugs.opensuse.org/

# icecream 0

Name:           jakarta-commons-httpclient3
%define short_name httpclient3
%define release    0.rc4.1jpp
Version:        3.0.1
Release:        253.<RELEASE32>
License:        The Apache Software License
Summary:        Feature rich package for accessing resources via HTTP
Url:            http://jakarta.apache.org/commons/httpclient/
Group:          Development/Libraries/Java
#Source0:        http://archive.apache.org/dist/jakarta/commons/httpclient/source/commons-httpclient-3.0-rc4-src.tar.gz
Source0:        commons-httpclient-%{version}-src.tar.bz2
BuildRequires:  ant-junit
BuildRequires:  commons-codec
BuildRequires:  commons-discovery
BuildRequires:  jaf
BuildRequires:  java-devel
BuildRequires:  javamail
BuildRequires:  log4j
BuildRequires:  servletapi5
BuildRequires:  wsdl4j
Requires:       commons-logging
Provides:       commons-%{short_name} = %{version}
Obsoletes:      commons-%{short_name} < %{version}
Provides:       %{name} = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
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 Jakarta Commons
HttpClient component seeks to fill this void by providing an efficient,
up-to-date, and feature-rich package implementing the client side of
the most recent HTTP standards and recommendations.

Designed for extension while providing robust support for the base HTTP
protocol, 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.

%package        javadoc
License:        The Apache Software License
Summary:        Developer documentation for jakarta-commons-httpclient3
Group:          Development/Libraries/Java
Requires(pre):  coreutils
%description    javadoc
Developer documentation for jakarta-commons-httpclient3 in JavaDoc


%package        demo
License:        The Apache Software License
Summary:        Demonstration files for  jakarta-commons-httpclient3
Group:          Development/Libraries/Java
Requires:       %{name} = %{version}
%description    demo
Demonstration files for jakarta-commons-httpclient3. NOTE: It is
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.


%package        manual
License:        The Apache Software License
Summary:        Manual for jakarta-commons-httpclient3
Group:          Development/Libraries/Java
%description    manual
Manual for jakarta-commons-httpclient3


%setup -q -n commons-httpclient-%{version}
rm -rf docs/apidocs docs/*.patch docs/*.orig docs/*.rej
# To fix error about unexisting lib dir
mkdir lib

export CLASSPATH=%(build-classpath jsse jce junit commons-codec commons-logging)
ANT_OPTS=-D"file.encoding=ISO-8859-1" ant \
  -Dbuild.sysclasspath=first \
  -Djavadoc.j2sdk.link=%{_javadocdir}/java \
  -Djavadoc.logging.link=%{_javadocdir}/jakarta-commons-logging \

# jars
mkdir -p %{buildroot}%{_javadir}
cp -p dist/commons-httpclient.jar \
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done)
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|httpclient3|httpclient|g"`; done)
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc
mkdir -p %{buildroot}%{_javadocdir}
mv dist/docs/api %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink
# demo
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -pr src/examples src/contrib %{buildroot}%{_datadir}/%{name}
# manual and docs
rm -f dist/docs/{BUILDING,TESTING}.txt
ln -s %{_javadocdir}/%{name} dist/docs/apidocs

rm -rf %{buildroot}

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}


%files javadoc
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%files demo

%files manual
%doc dist/docs/*