[google-guice] Don't try to build extension modules unless they are needed

Mikolaj Izdebski mizdebsk at fedoraproject.org
Fri Nov 9 15:06:32 UTC 2012


commit 30fccb6be280d02b7ddde8f1196aa3c775cb1fb3
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date:   Fri Nov 9 16:04:14 2012 +0100

    Don't try to build extension modules unless they are needed

 google-guice.spec |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/google-guice.spec b/google-guice.spec
index 4361a92..b8862a1 100644
--- a/google-guice.spec
+++ b/google-guice.spec
@@ -7,7 +7,7 @@
 
 Name:           google-%{short_name}
 Version:        3.1.2
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Lightweight dependency injection framework for Java 5 and above
 Group:          Development/Libraries
 License:        ASL 2.0
@@ -25,10 +25,14 @@ BuildRequires:  aopalliance
 BuildRequires:  atinject
 BuildRequires:  cglib
 BuildRequires:  guava
-BuildRequires:  hibernate-jpa-2.0-api
 BuildRequires:  slf4j
+
+%if %{with extensions}
+BuildRequires:  hibernate-jpa-2.0-api
 BuildRequires:  springframework-beans
 BuildRequires:  tomcat-servlet-3.0-api
+%endif
+
 # Test dependencies:
 %if 0
 BuildRequires:  maven-surefire-provider-testng
@@ -216,6 +220,11 @@ find -name '*.jar' -delete
 # maven-javadoc-plugin to generate javadocs with default style.
 %pom_remove_plugin :maven-javadoc-plugin
 
+# Don't try to build extension modules unless they are needed
+%if %{without extensions}
+%pom_disable_module extensions
+%endif
+
 %build
 # Skip tests because of missing dependency (hsqldb-j5).
 mvn-rpmbuild -e -Dmaven.test.skip=true verify javadoc:aggregate
@@ -300,6 +309,9 @@ install -p -m 644 extensions/throwingproviders/pom.xml %{buildroot}%{_mavenpomdi
 
 
 %changelog
+* Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk at redhat.com> - 3.1.2-6
+- Don't try to build extension modules unless they are needed
+
 * Fri Nov  9 2012 Mikolaj Izdebski <mizdebsk at redhat.com> - 3.1.2-5
 - Conditionalize %%install section too
 


More information about the scm-commits mailing list