# Copyright (c) 2000-2007, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define _with_gcj_support 0 %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} %define short_name httpclient Name: jakarta-commons-httpclient Version: 3.1 Release: %mkrel 2.3.4 Epoch: 1 Summary: Jakarta Commons HTTPClient implements the client side of HTTP standards License: Apache Software License Source0: http://archive.apache.org/dist/httpcomponents/commons-httpclient/source/commons-httpclient-3.1-src.tar.gz Patch0: %{name}-disablecryptotests.patch # Add OSGi MANIFEST.MF bits Patch1: %{name}-addosgimanifest.patch URL: http://jakarta.apache.org/commons/httpclient/ Group: Development/Java %if ! %{gcj_support} Buildarch: noarch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: java-rpmbuild >= 0:1.5 BuildRequires: ant BuildRequires: jakarta-commons-codec BuildRequires: jakarta-commons-logging >= 0:1.0.3 BuildRequires: jce >= 0:1.2.2 BuildRequires: jsse >= 0:1.0.3.01 #BuildRequires: java-javadoc BuildRequires: jakarta-commons-logging-javadoc BuildRequires: junit #BuildRequires: jaxp = 1.3 Requires: jakarta-commons-logging >= 0:1.0.3 Provides: commons-httpclient = %{epoch}:%{version}-%{release} Obsoletes: commons-httpclient < %{epoch}:%{version}-%{release} Provides: jakarta-commons-httpclient3 = %{epoch}:%{version}-%{release} Obsoletes: jakarta-commons-httpclient3 < %{epoch}:%{version}-%{release} %if %{gcj_support} BuildRequires: java-gcj-compat-devel %endif %description The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, and increase the number of applications that may require HTTP support. Although the java.net package provides basic support for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. The Jakarta Commons HTTP Client 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 HTTP Client 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 Summary: Javadoc for %{name} Group: Development/Java %description javadoc %{summary}. %package demo Summary: Demos for %{name} Group: Development/Java Requires: %{name} = %{epoch}:%{version}-%{release} %description demo %{summary}. %package manual Summary: Manual for %{name} Group: Development/Java Requires: %{name}-javadoc = %{epoch}:%{version}-%{release} %description manual %{summary}. %prep %setup -q -n commons-httpclient-%{version} mkdir lib # duh rm -rf docs/apidocs docs/*.patch docs/*.orig docs/*.rej %patch0 pushd src/conf %{__sed} -i 's/\r//' MANIFEST.MF %patch1 popd # 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 # FIXME: These tests fail due to absence of jks in libgcj. Disable them for now. rm -f src/test/org/apache/commons/httpclient/TestProxy.java rm -f src/test/org/apache/commons/httpclient/params/TestSSLTunnelParams.java %{__sed} -i 's/\r//' RELEASE_NOTES.txt %{__sed} -i 's/\r//' README.txt %{__sed} -i 's/\r//' LICENSE.txt %build export CLASSPATH=$(build-classpath jsse jce jakarta-commons-codec jakarta-commons-logging junit) %{ant} \ -Dbuild.sysclasspath=first \ -Djavadoc.j2sdk.link=%{_javadocdir}/java \ -Djavadoc.logging.link=%{_javadocdir}/jakarta-commons-logging \ -Dtest.failonerror=false \ dist test %install rm -rf $RPM_BUILD_ROOT # jars mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p dist/commons-httpclient.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done) (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # compat symlink pushd $RPM_BUILD_ROOT%{_javadir} ln -s commons-httpclient.jar commons-httpclient3.jar popd # javadoc mkdir -p $RPM_BUILD_ROOT%{_javadocdir} mv dist/docs/api $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} # demo mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr src/examples src/contrib $RPM_BUILD_ROOT%{_datadir}/%{name} # manual and docs rm -f dist/docs/{BUILDING,TESTING}.txt ln -s %{_javadocdir}/%{name}-%{version} dist/docs/apidocs %{gcj_compile} %clean rm -rf $RPM_BUILD_ROOT %if %{gcj_support} %post %{update_gcjdb} %endif %if %{gcj_support} %postun %{clean_gcjdb} %endif %files %defattr(0644,root,root,0755) %doc LICENSE.txt README.txt RELEASE_NOTES.txt %{_javadir}/* %{gcj_files} %files javadoc %defattr(0644,root,root,0755) %doc %{_javadocdir}/%{name}-%{version} %files demo %defattr(0644,root,root,0755) %{_datadir}/%{name} %files manual %defattr(0644,root,root,0755) %doc dist/docs/* %changelog * Wed Mar 17 2010 Oden Eriksson <oeriksson@mandriva.com> 1:3.1-2.3.4mdv2010.1 + Revision: 522978 - rebuilt for 2010.1 * Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 1:3.1-2.3.3mdv2010.0 + Revision: 425437 - rebuild * Sat Mar 07 2009 Antoine Ginies <aginies@mandriva.com> 1:3.1-2.3.2mdv2009.1 + Revision: 351281 - rebuild * Sun Aug 10 2008 Alexander Kurtakov <akurtakov@mandriva.org> 1:3.1-2.3.1mdv2009.0 + Revision: 270132 - update OSGi manifest * Wed Aug 06 2008 Thierry Vignaud <tv@mandriva.org> 1:3.1-2.1.1mdv2009.0 + Revision: 264717 - rebuild early 2009.0 package (before pixel changes) * Mon Apr 21 2008 Alexander Kurtakov <akurtakov@mandriva.org> 1:3.1-0.1.1mdv2009.0 + Revision: 196295 - new version + Thierry Vignaud <tv@mandriva.org> - fix no-buildroot-tag - kill re-definition of %%buildroot on Pixel's request * Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 1:3.0.1-4.0.2mdv2008.1 + Revision: 120912 - buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64) * Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 1:3.0.1-4.0.1mdv2008.0 + Revision: 87409 - rebuild to filter out autorequires of GCJ AOT objects - remove unnecessary Requires(post) on java-gcj-compat * Tue Sep 11 2007 David Walluck <walluck@mandriva.org> 1:3.0.1-4.0.0mdv2008.0 + Revision: 84555 - fix build-classpath call - sync with fc to add osgi manifest * Sun Sep 09 2007 Pascal Terjan <pterjan@mandriva.org> 1:3.0.1-4mdv2008.0 + Revision: 83392 - Make the package submitable - rebuild - rebuild * Thu Mar 15 2007 Christiaan Welvaart <spturtle@mandriva.org> 3.0.1-2mdv2007.1 + Revision: 143920 - rebuild for 2007.1 - Import jakarta-commons-httpclient * Sat Jun 03 2006 David Walluck <walluck@mandriva.org> 1:3.0.1-1mdv2007.0 - 3.0.1 - rebuild for libgcj.so.7 * Sun Jan 15 2006 David Walluck <walluck@mandriva.org> 1:3.0-2mdk - BuildRequires: java-devel, java-gcj-compat-devel * Wed Jan 11 2006 David Walluck <walluck@mandriva.org> 1:3.0-1mdk - 3.0 - aot compile * Sun Sep 11 2005 David Walluck <walluck@mandriva.org> 1:3.0-0.rc2.1mdk - release * Thu Jun 16 2005 Gary Benson <gbenson@redhat.com> - 1:3.0-0.rc2.0jpp_1fc - Build into Fedora. * Wed Jun 08 2005 Gary Benson <gbenson@redhat.com> - Avoid an API hole in libgcj's Swing implementation. - Skip tests (suite is full of Sun-specific classes). * Fri May 06 2005 Fernando Nasser <fnasser@redhat.com> - 1:3.0-0.rc2.1jpp_1rh - First Red Hat build * Fri May 06 2005 Fernando Nasser <fnasser@redhat.com> - 1:3.0-0.rc2.1jpp - Update to 3.0 rc2. * Tue Nov 23 2004 Fernando Nasser <fnasser@redhat.com> - 1:2.0.2-1jpp_1rh - Merge with upstream for upgrade * Thu Nov 04 2004 Ville Skyttä <ville.skytta at iki.fi> - 1:2.0.2-1jpp - Update to 2.0.2. - Fix Group tag in -manual. * Tue Aug 24 2004 Randy Watler <rwatler at finali.com> - 0:2.0-2jpp - Rebuild with ant-1.6.2