diff --git a/0001-Cleanup-pom.patch b/0001-Cleanup-pom.patch
index 05e5e7e..d4ba8e6 100644
--- a/0001-Cleanup-pom.patch
+++ b/0001-Cleanup-pom.patch
@@ -106,7 +106,16 @@
--- httpclient/pom.xml.sav 2011-01-17 22:00:53.000000000 +0200
-+++ httpclient/pom.xml 2011-02-18 11:05:10.474559948 +0200
++++ httpclient/pom.xml 2011-02-18 13:38:36.221371560 +0200
+@@ -38,7 +38,7 @@
+ HttpComponents Client (base module)
+
+ http://hc.apache.org/httpcomponents-client
+- jar
++ bundle
+
+
+
@@ -71,12 +71,6 @@
${easymock.version}
test
@@ -120,7 +129,7 @@
-@@ -122,25 +116,7 @@
+@@ -122,25 +116,12 @@
@@ -143,11 +152,16 @@
-
-
-
++
++ org.apache.felix
++ maven-bundle-plugin
++ true
++
+
-@@ -165,14 +141,6 @@
+@@ -165,14 +146,6 @@
diff --git a/httpcomponents-client.spec b/httpcomponents-client.spec
index af77b86..bcade7f 100644
--- a/httpcomponents-client.spec
+++ b/httpcomponents-client.spec
@@ -1,7 +1,9 @@
+%global basename httpcomponents
+
Name: httpcomponents-client
Summary: HTTP agent implementation based on httpcomponents HttpCore
Version: 4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Development/Libraries
License: ASL 2.0
URL: http://hc.apache.org/
@@ -11,11 +13,9 @@ Patch0: 0001-Cleanup-pom.patch
BuildArch: noarch
-
BuildRequires: httpcomponents-project
BuildRequires: httpcomponents-core
-
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires: httpcomponents-core
@@ -37,7 +37,7 @@ Group: Documentation
Requires: jpackage-utils
%description javadoc
-%{summary}.
+API docs for %{name}.
%prep
@@ -46,25 +46,25 @@ Requires: jpackage-utils
%build
# skip httpmime, httpclient only. For httpmime we need org.apache.james:apache-mime4j
-cd httpclient
+pushd httpclient
mvn-rpmbuild -Dmaven.test.skip=true install javadoc:javadoc
-
+popd
%install
cd httpclient
# jars
-install -D -m 0644 target/httpclient-%{version}.jar %{buildroot}%{_javadir}/%{name}/httpclient.jar
+install -D -m 0644 target/httpclient-%{version}.jar %{buildroot}%{_javadir}/%{basename}/httpclient.jar
# pom
install -D -m 0644 pom.xml \
- %{buildroot}/%{_mavenpomdir}/JPP.%{name}-httpclient.pom
-%add_to_maven_depmap org.apache.httpcomponents httpclient %{version} JPP/%{name} httpclient
+ %{buildroot}/%{_mavenpomdir}/JPP.%{basename}-httpclient.pom
+%add_to_maven_depmap org.apache.httpcomponents httpclient %{version} JPP/%{basename} httpclient
# main pom
install -D -m 0644 ../pom.xml \
- %{buildroot}/%{_mavenpomdir}/JPP.%{name}-httpcomponents-client.pom
-%add_to_maven_depmap org.apache.httpcomponents httpcomponents-client %{version} JPP/%{name} httpcomponents-client
+ %{buildroot}/%{_mavenpomdir}/JPP.%{basename}-httpcomponents-client.pom
+%add_to_maven_depmap org.apache.httpcomponents httpcomponents-client %{version} JPP/%{basename} httpcomponents-client
# javadocs
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
@@ -80,9 +80,9 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%files
%defattr(-,root,root,-)
%doc README.txt LICENSE.txt RELEASE_NOTES.txt
-%{_mavendepmapfragdir}/%{name}
-%{_mavenpomdir}/JPP.%{name}*.pom
-%{_javadir}/%{name}
+%{_mavendepmapfragdir}/%{basename}
+%{_mavenpomdir}/JPP.%{basename}*.pom
+%{_javadir}/%{basename}
%files javadoc
%defattr(-,root,root,-)
@@ -91,6 +91,10 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%changelog
+* Fri Feb 18 2011 Alexander Kurtakov 4.1-2
+- OSGify properly.
+- Install into %{_javadir}/%{basename}.
+
* Thu Feb 17 2011 Alexander Kurtakov 4.1-1
- Update to latest upstream version.