79cc52
%global base_name httpcomponents
79cc52
79cc52
Name:              httpcomponents-client
79cc52
Summary:           HTTP agent implementation based on httpcomponents HttpCore
79cc52
Version:           4.2.5
79cc52
Release:           5%{?dist}
79cc52
Group:             Development/Libraries
79cc52
License:           ASL 2.0
79cc52
URL:               http://hc.apache.org/
79cc52
Source0:           http://archive.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-src.tar.gz
79cc52
Patch0:            0001-Fix-CVE-2014-3577.patch
79cc52
79cc52
BuildArch:         noarch
79cc52
79cc52
BuildRequires:     maven-local
79cc52
BuildRequires:     mvn(commons-codec:commons-codec)
79cc52
BuildRequires:     mvn(commons-logging:commons-logging)
79cc52
BuildRequires:     mvn(org.apache.httpcomponents:httpcore)
79cc52
BuildRequires:     mvn(org.apache.httpcomponents:project)
79cc52
%if 0%{?fedora}
79cc52
# Test dependencies
79cc52
BuildRequires:     mvn(org.mockito:mockito-core)
79cc52
BuildRequires:     mvn(junit:junit)
79cc52
%endif
79cc52
79cc52
%description
79cc52
HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on
79cc52
httpcomponents HttpCore. It also provides reusable components for
79cc52
client-side authentication, HTTP state management, and HTTP connection
79cc52
management. HttpComponents Client is a successor of and replacement
79cc52
for Commons HttpClient 3.x. Users of Commons HttpClient are strongly
79cc52
encouraged to upgrade.
79cc52
79cc52
%package        javadoc
79cc52
Summary:        API documentation for %{name}
79cc52
Group:          Documentation
79cc52
79cc52
%description    javadoc
79cc52
%{summary}.
79cc52
79cc52
79cc52
%prep
79cc52
%setup -q
79cc52
79cc52
%patch0 -p1
79cc52
79cc52
# Remove optional build deps not available in Fedora
79cc52
%pom_disable_module httpclient-cache
79cc52
%pom_disable_module httpclient-osgi
79cc52
%pom_disable_module fluent-hc
79cc52
%pom_remove_plugin :maven-notice-plugin
79cc52
%pom_remove_plugin :docbkx-maven-plugin
79cc52
%pom_remove_plugin :clirr-maven-plugin
79cc52
%pom_remove_plugin :maven-clover2-plugin httpclient
79cc52
%if !0%{?fedora}
79cc52
%pom_remove_dep :mockito-core httpclient
79cc52
%endif
79cc52
79cc52
# Add proper Apache felix bundle plugin instructions
79cc52
# so that we get a reasonable OSGi manifest.
79cc52
for module in httpclient httpmime; do
79cc52
    %pom_xpath_remove "pom:project/pom:packaging" $module
79cc52
    %pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" $module
79cc52
done
79cc52
79cc52
# Make httpmime into bundle
79cc52
%pom_xpath_inject pom:build/pom:plugins "
79cc52
    <plugin>
79cc52
      <groupId>org.apache.felix</groupId>
79cc52
      <artifactId>maven-bundle-plugin</artifactId>
79cc52
      <extensions>true</extensions>
79cc52
    </plugin>" httpmime
79cc52
79cc52
# Make httpclient into bundle
79cc52
%pom_xpath_inject pom:reporting/pom:plugins "
79cc52
    <plugin>
79cc52
      <groupId>org.apache.felix</groupId>
79cc52
      <artifactId>maven-bundle-plugin</artifactId>
79cc52
      <configuration>
79cc52
        <instructions>
79cc52
          <Export-Package>*</Export-Package>
79cc52
          <Private-Package></Private-Package>
79cc52
          <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
79cc52
        </instructions>
79cc52
      </configuration>
79cc52
    </plugin>" httpclient
79cc52
%pom_xpath_inject pom:build/pom:plugins "
79cc52
    <plugin>
79cc52
      <groupId>org.apache.felix</groupId>
79cc52
      <artifactId>maven-bundle-plugin</artifactId>
79cc52
      <extensions>true</extensions>
79cc52
      <configuration>
79cc52
        <instructions>
79cc52
          <Export-Package>org.apache.http.*,!org.apache.http.param</Export-Package>
79cc52
          <Private-Package></Private-Package>
79cc52
          <_nouses>true</_nouses>
79cc52
          <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
79cc52
        </instructions>
79cc52
        <excludeDependencies>true</excludeDependencies>
79cc52
      </configuration>
79cc52
    </plugin>" httpclient
79cc52
79cc52
79cc52
79cc52
%build
79cc52
%mvn_file ":{*}" httpcomponents/@1
79cc52
79cc52
# Build with tests enabled on Fedora
79cc52
%if 0%{?fedora}
79cc52
%mvn_build
79cc52
%else
79cc52
%mvn_build -f
79cc52
%endif
79cc52
79cc52
79cc52
%install
79cc52
%mvn_install
79cc52
79cc52
79cc52
%files -f .mfiles
79cc52
%doc LICENSE.txt NOTICE.txt
79cc52
%doc README.txt RELEASE_NOTES.txt
79cc52
79cc52
%files javadoc -f .mfiles-javadoc
79cc52
%doc LICENSE.txt NOTICE.txt
79cc52
79cc52
%changelog
79cc52
* Tue Aug 12 2014 Michal Srb <msrb@redhat.com> - 4.2.5-5
79cc52
- Fix MITM security vulnerability
79cc52
- Resolves: CVE-2014-3577
79cc52
79cc52
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 4.2.5-4
79cc52
- Mass rebuild 2013-12-27
79cc52
79cc52
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.5-3
79cc52
- Rebuild to regenerate API documentation
79cc52
- Resolves: CVE-2013-1571
79cc52
79cc52
* Mon Jun 10 2013 Michal Srb <msrb@redhat.com> - 4.2.5-2
79cc52
- Enable tests on Fedora
79cc52
79cc52
* Thu Apr 25 2013 Michal Srb <msrb@redhat.com> - 4.2.5-1
79cc52
- Update to upstream version 4.2.5
79cc52
79cc52
* Thu Apr 11 2013 Michal Srb <msrb@redhat.com> - 4.2.4-1
79cc52
- Update to upstream version 4.2.4
79cc52
79cc52
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 4.2.3-3
79cc52
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
79cc52
- Replace maven BuildRequires with maven-local
79cc52
79cc52
* Fri Jan 25 2013 Michal Srb <msrb@redhat.com> - 4.2.3-2
79cc52
- Build with xmvn
79cc52
- Disable fluent-hc module
79cc52
79cc52
* Thu Jan 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.3-1
79cc52
- Update to upstream version 4.2.3
79cc52
79cc52
* Thu Oct 25 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.2-1
79cc52
- Update to upstream version 4.2.2
79cc52
79cc52
* Wed Aug  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-3
79cc52
- Fix OSGi manifest in httpmime
79cc52
79cc52
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-2
79cc52
- Install NOTICE.txt file
79cc52
- Fix javadir directory ownership
79cc52
- Fix directory permissions
79cc52
- Preserve timestamps
79cc52
- Replace add_to_maven_depmap with add_maven_depmap
79cc52
79cc52
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-1
79cc52
- Update to upstream version 4.2.1
79cc52
- Convert patches to POM macros
79cc52
79cc52
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.3-4
79cc52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
79cc52
79cc52
* Wed May 2 2012 Alexander Kurtakov <akurtako@redhat.com> 4.1.3-3
79cc52
- Do not export org.apache.http.param in osgi.
79cc52
79cc52
* Mon Mar 26 2012 Alexander Kurtakov <akurtako@redhat.com> 4.1.3-2
79cc52
- Do not export * but only org.apache.http.* .
79cc52
- Do not generate uses clauses in the manifest.
79cc52
79cc52
* Thu Mar  1 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> 4.1.3-1
79cc52
- Update to latest upstream bugfix
79cc52
79cc52
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.2-2
79cc52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
79cc52
79cc52
* Tue Aug 16 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.2-1
79cc52
- Update to latest upstream (4.1.2)
79cc52
- Minor tweaks according to guidelines
79cc52
79cc52
* Fri Jul 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1.1-3
79cc52
- Fix for RH Bz#718830. Add instructions so as to not
79cc52
  Import-Package optional dependencies.
79cc52
79cc52
* Thu Apr 7 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1.1-2
79cc52
- Add BR/R apache-commons-codec, since httpcomponents-client's
79cc52
  MANIFEST.MF has an Import-Package: org.apache.commons.codec
79cc52
  header.
79cc52
79cc52
* Tue Mar 29 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.1-1
79cc52
- New upstream bugfix version (4.1.1)
79cc52
79cc52
* Tue Mar 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1-6
79cc52
- Explicitly set PrivatePackage to the empty set, so as to
79cc52
  export all packages.
79cc52
79cc52
* Thu Mar 10 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-5
79cc52
- OSGi export more packages.
79cc52
79cc52
* Fri Feb 25 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-4
79cc52
- Build httpmime module.
79cc52
79cc52
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-3
79cc52
- Don't use basename as an identifier.
79cc52
79cc52
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-2
79cc52
- OSGify properly.
79cc52
- Install into %{_javadir}/%{basename}.
79cc52
79cc52
* Thu Feb 17 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-1
79cc52
- Update to latest upstream version.
79cc52
79cc52
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.3-3
79cc52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
79cc52
79cc52
* Wed Dec 22 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.0.3-2
79cc52
- Added license to javadoc subpackage
79cc52
79cc52
* Mon Dec 20 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.0.3-1
79cc52
- Initial version