diff --git a/httpcomponents-core.spec b/httpcomponents-core.spec index fdbb08e..7087657 100644 --- a/httpcomponents-core.spec +++ b/httpcomponents-core.spec @@ -1,12 +1,15 @@ +%global basename httpcomponents + Name: httpcomponents-core Summary: Set of low level Java HTTP transport components for HTTP services Version: 4.1 -Release: 3%{?dist} +Release: 4%{?dist} Group: Development/Libraries License: ASL 2.0 URL: http://hc.apache.org/ Source0: http://www.apache.org/dist/httpcomponents/httpcore/source/httpcomponents-core-%{version}-src.tar.gz Patch0: 0001-Remove-unneeded-pom-dependencies.patch +Patch1: osgify.patch BuildArch: noarch BuildRequires: httpcomponents-project @@ -45,34 +48,31 @@ Requires: jpackage-utils %prep %setup -q %patch0 -p1 +%patch1 %build -export maven_repo_local=$(pwd)/.m2/repository -install -d $maven_repo_local - # start using install again when bundle plugin is updated to 2.1.0 -mvn-jpp -Dmaven.repo.local=$maven_repo_local \ - package javadoc:aggregate +mvn-rpmbuild package javadoc:aggregate %install install -d %{buildroot}/%{_mavenpomdir} -install -d %{buildroot}/%{_javadir}/%{name} +install -d %{buildroot}/%{_javadir}/%{basename} -for m in httpcore httpcore-nio httpcore-osgi; do +for m in httpcore httpcore-nio; do # poms - install -m 0644 $m/pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{name}-$m.pom + install -m 0644 $m/pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{basename}-$m.pom # jars - osgi doesn't have one if [ -f $m/target/$m-%{version}.jar ];then - install -m 0644 $m/target/$m-%{version}.jar %{buildroot}%{_javadir}/%{name}/$m.jar + install -m 0644 $m/target/$m-%{version}.jar %{buildroot}%{_javadir}/%{basename}/$m.jar fi - %add_to_maven_depmap org.apache.httpcomponents $m %{version} JPP/%{name} $m + %add_to_maven_depmap org.apache.httpcomponents $m %{version} JPP/%{basename} $m done # parent -install -D -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{name}-%{name}.pom -%add_to_maven_depmap org.apache.httpcomponents %{name} %{version} JPP/%{name} %{name} +install -D -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP.%{basename}-%{name}.pom +%add_to_maven_depmap org.apache.httpcomponents %{name} %{version} JPP/%{basename} %{name} # javadocs install -dm 755 %{buildroot}%{_javadocdir}/%{name} @@ -88,8 +88,8 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name} %defattr(-,root,root,-) %doc README.txt LICENSE.txt RELEASE_NOTES.txt %{_mavendepmapfragdir}/%{name} -%{_mavenpomdir}/JPP.%{name}*.pom -%{_javadir}/%{name} +%{_mavenpomdir}/JPP.%{basename}*.pom +%{_javadir}/%{basename} %files javadoc %doc LICENSE.txt @@ -97,6 +97,10 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name} %doc %{_javadocdir}/* %changelog +* Fri Feb 18 2011 Alexander Kurtakov 4.1-4 +- Install into %{_javadir}/httpcomponents. We will use it for client libs too. +- Proper osgi info. + * Wed Feb 09 2011 Fedora Release Engineering - 4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/osgify.patch b/osgify.patch new file mode 100644 index 0000000..0613552 --- /dev/null +++ b/osgify.patch @@ -0,0 +1,46 @@ +--- httpcore/pom.xml.sav 2011-02-18 10:30:46.956382888 +0200 ++++ httpcore/pom.xml 2011-02-18 10:32:23.412697802 +0200 +@@ -39,7 +39,7 @@ + HttpComponents Core (blocking I/O) + + http://hc.apache.org/httpcomponents-core-ga/ +- jar ++ bundle + + + UTF-8 +@@ -111,6 +111,11 @@ + + + ++ ++ org.apache.felix ++ maven-bundle-plugin ++ true ++ + + + +--- httpcore-nio/pom.xml.sav 2011-02-18 10:34:29.238978764 +0200 ++++ httpcore-nio/pom.xml 2011-02-18 10:35:23.813101329 +0200 +@@ -39,7 +39,7 @@ + HttpComponents Core (non-blocking I/O) + + http://hc.apache.org/httpcomponents-core/ +- jar ++ bundle + + + +@@ -103,6 +103,11 @@ + + + ++ ++ org.apache.felix ++ maven-bundle-plugin ++ true ++ + + +