diff --git a/httpclient-pom-fix.patch b/httpclient-pom-fix.patch
new file mode 100644
index 0000000..a1d4327
--- /dev/null
+++ b/httpclient-pom-fix.patch
@@ -0,0 +1,80 @@
+--- httpclient/pom.xml.sav 2011-03-14 16:54:35.000000000 -0400
++++ httpclient/pom.xml 2011-07-15 16:41:41.568795119 -0400
+@@ -38,7 +38,7 @@
+ HttpComponents Client (base module)
+
+ http://hc.apache.org/httpcomponents-client
+- jar
++ bundle
+
+
+
+@@ -65,12 +65,6 @@
+ ${junit.version}
+ test
+
+-
+- org.mockito
+- mockito-core
+- ${mockito.version}
+- test
+-
+
+
+
+@@ -116,25 +110,19 @@
+
+
+
+-
+- com.atlassian.maven.plugins
+- maven-clover2-plugin
++
++ org.apache.felix
++ maven-bundle-plugin
++ true
+
+- threaded
+- 100
+- 50%
++
++ *
++
++ !org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*
++
+
+-
+-
+- site
+- pre-site
+-
+- instrument
+-
+-
+-
+-
+-
++
++
+
+
+
+@@ -161,11 +149,14 @@
+
+
+
+- com.atlassian.maven.plugins
+- maven-clover2-plugin
+- ${clover.version}
++ org.apache.felix
++ maven-bundle-plugin
+
+- 1.5
++
++ *
++
++ !org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*
++
+
+
+
diff --git a/httpcomponents-client.spec b/httpcomponents-client.spec
index 1642a41..73170e9 100644
--- a/httpcomponents-client.spec
+++ b/httpcomponents-client.spec
@@ -3,13 +3,17 @@
Name: httpcomponents-client
Summary: HTTP agent implementation based on httpcomponents HttpCore
Version: 4.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Development/Libraries
License: ASL 2.0
URL: http://hc.apache.org/
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/httpcomponents-client-%{version}-src.tar.gz
# Remove optional build deps not available in Fedora
-Patch0: 0001-Cleanup-pom.patch
+# and add proper Apache felix bundle plugin instructions
+# so that we get a reasonable OSGi manifest.
+Patch0: main-pom-fix.patch
+Patch1: httpclient-pom-fix.patch
+Patch2: httpmime-pom-fix.patch
BuildArch: noarch
@@ -46,7 +50,9 @@ API docs for %{name}.
%prep
%setup -q
-%patch0 -p1 -b .sav
+%patch0 -b .sav
+%patch1 -b .sav
+%patch2 -b .sav
%build
mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate
@@ -94,6 +100,10 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%changelog
+* Fri Jul 15 2011 Severin Gehwolf 4.1.1-3
+- Fix for RH Bz#718830. Add instructions so as to not
+ Import-Package optional dependencies.
+
* Thu Apr 7 2011 Severin Gehwolf 4.1.1-2
- Add BR/R apache-commons-codec, since httpcomponents-client's
MANIFEST.MF has an Import-Package: org.apache.commons.codec
diff --git a/httpmime-pom-fix.patch b/httpmime-pom-fix.patch
new file mode 100644
index 0000000..5ecc705
--- /dev/null
+++ b/httpmime-pom-fix.patch
@@ -0,0 +1,23 @@
+--- httpmime/pom.xml.sav 2011-03-14 16:54:32.000000000 -0400
++++ httpmime/pom.xml 2011-07-15 13:51:08.530725700 -0400
+@@ -38,7 +38,7 @@
+ HttpComponents HttpClient - MIME coded entities
+
+ http://hc.apache.org/httpcomponents-client
+- jar
++ bundle
+
+
+
+@@ -112,6 +112,11 @@
+
+
+
++
++ org.apache.felix
++ maven-bundle-plugin
++ true
++
+
+
+
diff --git a/0001-Cleanup-pom.patch b/main-pom-fix.patch
similarity index 50%
rename from 0001-Cleanup-pom.patch
rename to main-pom-fix.patch
index 0577ad9..371e98d 100644
--- a/0001-Cleanup-pom.patch
+++ b/main-pom-fix.patch
@@ -1,123 +1,5 @@
-From 1e435abf209089692a3ba2dca86be757e892c10b Mon Sep 17 00:00:00 2001
-From: Stanislav Ochotnicky
-Date: Tue, 29 Mar 2011 14:02:03 +0200
-Subject: [PATCH] Cleanup pom
-
----
- httpclient/pom.xml | 45 +++++++++++------------------
- httpmime/pom.xml | 7 ++++-
- pom.xml | 79 +--------------------------------------------------
- 3 files changed, 25 insertions(+), 106 deletions(-)
-
-diff --git a/httpclient/pom.xml b/httpclient/pom.xml
-index 4ce1cab..e0ac937 100644
---- a/httpclient/pom.xml
-+++ b/httpclient/pom.xml
-@@ -38,7 +38,7 @@
- HttpComponents Client (base module)
-
- http://hc.apache.org/httpcomponents-client
-- jar
-+ bundle
-
-
-
-@@ -65,12 +65,6 @@
- ${junit.version}
- test
-
--
-- org.mockito
-- mockito-core
-- ${mockito.version}
-- test
--
-
-
-
-@@ -116,25 +110,18 @@
-
-
-
--
-- com.atlassian.maven.plugins
-- maven-clover2-plugin
-+
-+ org.apache.felix
-+ maven-bundle-plugin
-+ true
-
-- threaded
-- 100
-- 50%
-+
-+ *
-+
-+
-
--
--
-- site
-- pre-site
--
-- instrument
--
--
--
--
--
-+
-+
-
-
-
-@@ -161,11 +148,13 @@
-
-
-
-- com.atlassian.maven.plugins
-- maven-clover2-plugin
-- ${clover.version}
-+ org.apache.felix
-+ maven-bundle-plugin
-
-- 1.5
-+
-+ *
-+
-+
-
-
-
-diff --git a/httpmime/pom.xml b/httpmime/pom.xml
-index 8853cc2..6922f99 100644
---- a/httpmime/pom.xml
-+++ b/httpmime/pom.xml
-@@ -38,7 +38,7 @@
- HttpComponents HttpClient - MIME coded entities
-
- http://hc.apache.org/httpcomponents-client
-- jar
-+ bundle
-
-
-
-@@ -112,6 +112,11 @@
-
-
-
-+
-+ org.apache.felix
-+ maven-bundle-plugin
-+ true
-+
-
-
-
-diff --git a/pom.xml b/pom.xml
-index e3ba289..8ab6b70 100644
---- a/pom.xml
-+++ b/pom.xml
+--- pom.xml.sav 2011-03-14 16:54:35.000000000 -0400
++++ pom.xml 2011-07-15 13:51:08.537725611 -0400
@@ -82,28 +82,11 @@
httpclient
@@ -230,6 +112,3 @@ index e3ba289..8ab6b70 100644
---
-1.7.4
-