mbooth pushed to felix-gogo-command (f22). "Avoid unnecessary runtime deps and re-generate build-deps"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Mar 30 20:53:12 UTC 2015


>From 5aa6e79f7aa1fe0651bcffde55816895bb700ec8 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth at redhat.com>
Date: Mon, 30 Mar 2015 21:22:16 +0100
Subject: Avoid unnecessary runtime deps and re-generate build-deps


diff --git a/.gitignore b/.gitignore
index 32dcc8b..002ac31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
-felix-gogo-command-0.12.0-2.fc15.src.rpm
-/org.apache.felix.gogo.command-0.12.0-project.tar.gz
-/org.apache.felix.gogo.command-0.14.0-project.tar.gz
+/org.apache.felix.gogo.command-*-project.tar.gz
+/*.src.rpm
+/noarch/
+/.project
+/.build-*.log
diff --git a/felix-gogo-command.spec b/felix-gogo-command.spec
index 6c8bb25..c0aa6b7 100644
--- a/felix-gogo-command.spec
+++ b/felix-gogo-command.spec
@@ -5,10 +5,9 @@
 
 Name:           %{?scl_prefix}felix-gogo-command
 Version:        0.14.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Apache Felix Gogo Command
 
-Group:          Development/Libraries
 License:        ASL 2.0
 URL:            http://felix.apache.org
 Source0:        http://www.apache.org/dist/felix/%{bundle}-%{version}-project.tar.gz
@@ -18,29 +17,14 @@ Patch1:         java7compatibility.patch
 
 BuildArch:      noarch
 
-BuildRequires:  java
-# This is to ensure we get OpenJDK and not GCJ
-BuildRequires:  java-devel >= 1:1.7.0
 BuildRequires:  maven-local
-BuildRequires:  maven-dependency-plugin
-BuildRequires:  maven-surefire-plugin
-BuildRequires:  maven-surefire-provider-junit
-BuildRequires:  maven-install-plugin
-BuildRequires:  mockito
-
-BuildRequires:  felix-osgi-core
-BuildRequires:  felix-framework
-BuildRequires:  felix-osgi-compendium
-BuildRequires:  %{?scl_prefix}felix-gogo-runtime >= 0.12.0
-BuildRequires:  %{?scl_prefix}felix-gogo-parent
+BuildRequires:  mvn(org.apache.felix:gogo-parent:pom:)
+BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
 BuildRequires:  mvn(org.apache.felix:org.apache.felix.bundlerepository)
-%{?scl:BuildRequires:	  %{?scl_prefix}build}
-
-Requires:       felix-framework
-Requires:       felix-osgi-compendium
-Requires:       %{?scl_prefix}felix-gogo-runtime >= 0.12.0
-Requires:       mvn(org.apache.felix:org.apache.felix.bundlerepository)
-%{?scl:Requires: %scl_runtime}
+BuildRequires:  mvn(org.apache.felix:org.apache.felix.framework)
+BuildRequires:  mvn(org.apache.felix:org.apache.felix.gogo.runtime)
+BuildRequires:  mvn(org.osgi:org.osgi.compendium)
+BuildRequires:  mvn(org.mockito:mockito-all)
 
 %description
 Provides basic shell commands for Gogo.
@@ -57,6 +41,13 @@ API documentation for %{pkg_name}.
 %patch0 -p1
 %patch1 -p1
 
+# These deps are provided at runtime by the osgi framework in which are running
+# Adding "provided" scope here avoids unnecessary deps on the felix stack if we
+# are running in a different osgi container like equinox, for example
+%pom_xpath_inject "pom:dependencies/pom:dependency[pom:artifactId[text()='org.apache.felix.framework']]" "<scope>provided</scope>"
+%pom_xpath_inject "pom:dependencies/pom:dependency[pom:artifactId[text()='org.osgi.compendium']]" "<scope>provided</scope>"
+%pom_xpath_inject "pom:dependencies/pom:dependency[pom:artifactId[text()='org.apache.felix.bundlerepository']]" "<scope>provided</scope>"
+
 %build
 %mvn_build
 
@@ -70,6 +61,9 @@ API documentation for %{pkg_name}.
 %doc LICENSE
 
 %changelog
+* Mon Mar 30 2015 Mat Booth <mat.booth at redhat.com> - 0.14.0-3
+- Avoid unnecessary runtime deps and re-generate build-deps
+
 * Thu Jul 03 2014 Mat Booth <mat.booth at redhat.com> - 0.14.0-2
 - BR/R: gogo-runtime >= 0.12.0
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/felix-gogo-command.git/commit/?h=f22&id=5aa6e79f7aa1fe0651bcffde55816895bb700ec8


More information about the scm-commits mailing list