Proper osgi info

Install into %{_javadir}/httpcomponents. We will use it for client
libs too.
This commit is contained in:
Alexander Kurtakov 2011-02-18 10:52:06 +02:00
parent 9c675c649f
commit d514c44d60
2 changed files with 65 additions and 15 deletions

View File

@ -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 <akurtako@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

46
osgify.patch Normal file
View File

@ -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)
</description>
<url>http://hc.apache.org/httpcomponents-core-ga/</url>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -111,6 +111,11 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
</plugins>
</build>
--- 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)
</description>
<url>http://hc.apache.org/httpcomponents-core/</url>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<dependencies>
<dependency>
@@ -103,6 +103,11 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
</plugins>
</build>