[felix-framework] Fix pom filename (Resolves rhbz#655798) and fix various packaging things according to new guidelines
mbooth
mbooth at fedoraproject.org
Sun Dec 12 17:43:59 UTC 2010
commit 30407c8a7cbd6c98f235029420a338f37ba43246
Author: mbooth <fedora at matbooth.co.uk>
Date: Sun Dec 12 17:43:22 2010 +0000
Fix pom filename (Resolves rhbz#655798) and fix various packaging things according to new guidelines
felix-framework.spec | 35 +++++++++++++++--------------------
1 files changed, 15 insertions(+), 20 deletions(-)
---
diff --git a/felix-framework.spec b/felix-framework.spec
index 40d6455..bcc00f8 100644
--- a/felix-framework.spec
+++ b/felix-framework.spec
@@ -8,7 +8,7 @@
Name: %{project}-framework
Version: 2.0.5
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Apache Felix Framework
Group: Development/Libraries
@@ -21,7 +21,6 @@ Source1: %{name}.demap
# Remove rat-maven-plugin
Patch0: %{bundle}-%{version}~pom.xml.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
@@ -36,12 +35,11 @@ BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-release-plugin
BuildRequires: maven-resources-plugin
+BuildRequires: maven-surefire-plugin
# TODO check availability and use new names
-#BuildRequires: maven-surefire-plugin
#BuildRequires: maven-bundle-plugin
# instead of
BuildRequires: maven-plugin-bundle
-BuildRequires: maven-surefire-maven-plugin
Requires: felix-osgi-compendium
Requires: felix-osgi-core
@@ -61,7 +59,7 @@ Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
-%global POM %{_mavenpomdir}/JPP.%{project}-%{name}.pom
+%global POM %{_mavenpomdir}/JPP.%{project}-%{bundle}.pom
%prep
%setup -q -n %{bundle}-%{version}
@@ -78,16 +76,10 @@ mvn-jpp -e \
install javadoc:javadoc
%install
-%__rm -rf %{buildroot}
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}/%{project}
install -m 644 target/%{bundle}-%{version}.jar \
- %{buildroot}%{_javadir}/%{project}/%{bundle}-%{version}.jar
-
-# versionless symlinks to jars
-(cd %{buildroot}%{_javadir}/%{project} && for jar in *-%{version}*.jar; \
- do %__ln_s -f $jar `echo $jar| sed "s|-%{version}||g"`; done)
+ %{buildroot}%{_javadir}/%{project}/%{bundle}.jar
%add_to_maven_depmap %{groupId} %{artifactId} %{version} JPP/%{project} %{bundle}
@@ -96,10 +88,8 @@ install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{POM}
# javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
-%__cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
-%__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
-%__rm -rf target/site/api*
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+%__cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%post
%update_maven_depmap
@@ -107,23 +97,28 @@ install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%postun
%update_maven_depmap
-%clean
-%__rm -rf %{buildroot}
+%pre javadoc
+# workaround for rpm bug, can be removed in F-17
+[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
+rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%files
%defattr(-,root,root,-)
-%doc LICENSE
%{_javadir}/%{project}/*
%{POM}
%config(noreplace) %{_mavendepmapfragdir}/%{name}
+%doc LICENSE
%files javadoc
%defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%doc LICENSE
%changelog
+* Sun Dec 12 2010 Mat Booth <fedora at matbooth.co.uk> - 2.0.5-4
+- Fix pom filename (Resolves rhbz#655798)
+- Fix various packaging things according to new guidelines
+
* Tue Jul 13 2010 Victor G. Vasilyev <victor.vasilyev at sun.com> 2.0.5-3
- BR: maven-invoker-plugin required for maven-javadoc-plugin
- Use new names of the maven plgins
More information about the scm-commits
mailing list