Add conditionals for memcached and ehcache
This commit is contained in:
parent
9a7c13acd9
commit
b0a4a6977a
@ -1,7 +1,10 @@
|
||||
%bcond_without memcached
|
||||
%bcond_without ehcache
|
||||
|
||||
Name: httpcomponents-client
|
||||
Summary: HTTP agent implementation based on httpcomponents HttpCore
|
||||
Version: 4.5.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: ASL 2.0
|
||||
URL: http://hc.apache.org/
|
||||
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-src.tar.gz
|
||||
@ -14,12 +17,15 @@ BuildRequires: maven-local
|
||||
BuildRequires: mvn(commons-codec:commons-codec)
|
||||
BuildRequires: mvn(commons-logging:commons-logging)
|
||||
BuildRequires: mvn(junit:junit)
|
||||
%if %{with ehcache}
|
||||
BuildRequires: mvn(net.sf.ehcache:ehcache-core)
|
||||
%endif
|
||||
%if %{with memcached}
|
||||
BuildRequires: mvn(net.spy:spymemcached)
|
||||
%endif
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.apache.httpcomponents:httpcore)
|
||||
BuildRequires: mvn(org.apache.httpcomponents:project:pom:)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: mvn(org.easymock:easymock)
|
||||
BuildRequires: mvn(org.mockito:mockito-core)
|
||||
@ -53,9 +59,6 @@ Summary: API documentation for %{name}
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
# Don't install javadoc and sources jars
|
||||
%mvn_package ":{*}::{sources,javadoc}:" __noinstall
|
||||
|
||||
%mvn_package :httpclient-cache cache
|
||||
|
||||
# Remove optional build deps not available in Fedora
|
||||
@ -65,6 +68,8 @@ Summary: API documentation for %{name}
|
||||
%pom_remove_plugin :clirr-maven-plugin
|
||||
%pom_remove_plugin :maven-checkstyle-plugin
|
||||
%pom_remove_plugin :apache-rat-plugin
|
||||
%pom_remove_plugin :maven-source-plugin
|
||||
%pom_remove_plugin :maven-javadoc-plugin
|
||||
|
||||
# Don't compile/run httpclient-cache tests - they are incompatible with EasyMock 3.3
|
||||
%pom_remove_plugin org.apache.maven.plugins:maven-jar-plugin httpclient-cache
|
||||
@ -150,6 +155,15 @@ done
|
||||
# requires network
|
||||
rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java
|
||||
|
||||
%if %{without memcached}
|
||||
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/memcached
|
||||
%pom_remove_dep :spymemcached httpclient-cache
|
||||
%endif
|
||||
%if %{without ehcache}
|
||||
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/ehcache
|
||||
%pom_remove_dep :ehcache-core httpclient-cache
|
||||
%endif
|
||||
|
||||
%build
|
||||
%mvn_file ":{*}" httpcomponents/@1
|
||||
|
||||
@ -168,6 +182,9 @@ rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java
|
||||
%doc LICENSE.txt NOTICE.txt
|
||||
|
||||
%changelog
|
||||
* Thu Feb 02 2017 Michael Simacek <msimacek@redhat.com> - 4.5.3-2
|
||||
- Add conditionals for memcached and ehcache
|
||||
|
||||
* Thu Jan 26 2017 Michael Simacek <msimacek@redhat.com> - 4.5.3-1
|
||||
- Update to upstream version 4.5.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user