[groovy18] Introduce groovy-lib subpackage

Michal Srb msrb at fedoraproject.org
Wed Oct 29 16:55:00 UTC 2014


commit 47290ca35a5845ffd84255ac2f1be2a0af0d8153
Author: Michal Srb <msrb at redhat.com>
Date:   Wed Aug 20 08:19:12 2014 +0200

    Introduce groovy-lib subpackage

 groovy18.spec |   46 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 43 insertions(+), 3 deletions(-)
---
diff --git a/groovy18.spec b/groovy18.spec
index 50fbfb8..e0816bb 100644
--- a/groovy18.spec
+++ b/groovy18.spec
@@ -4,7 +4,7 @@
 %global majorversion 1.8
 Name:           groovy18
 Version:        1.8.9
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        Dynamic language for the Java Platform
 Group:          Development/Languages
 # Some of the files are licensed under BSD and CPL terms, but the CPL has been superceded
@@ -47,7 +47,31 @@ BuildRequires:  mvn(org.apache.ant:ant-launcher)
 BuildRequires:  mvn(javax.servlet:servlet-api)
 BuildRequires:  mvn(javax.servlet:jsp-api)
 
+Requires:       %{name}-lib = %{version}-%{release}
 Requires:       java-devel >= 1.6
+# Following dependencies are optional from Maven POV,
+# but upstream ships them in binary distribution
+Requires:       mvn(junit:junit)
+# Only used for command line tools:
+Requires:       mvn(commons-cli:commons-cli)
+# Only used for Ant tasks & scripting tool:
+Requires:       mvn(org.apache.ant:ant)
+Requires:       mvn(org.apache.ant:ant-antlr)
+Requires:       mvn(org.apache.ant:ant-launcher)
+Requires:       mvn(org.apache.ant:ant-junit)
+# Only used for BSF adapter:
+Requires:       mvn(bsf:bsf)
+Requires:       mvn(commons-logging:commons-logging)
+# Used for servlet / gsp:
+Requires:       mvn(javax.servlet:jsp-api)
+Requires:       mvn(javax.servlet:servlet-api)
+# Used to dump out the AST, xpp only needed for reading:
+Requires:       mvn(com.thoughtworks.xstream:xstream)
+# Used for richer interactive groovysh support:
+Requires:       mvn(jline:jline:1)
+Requires:       mvn(org.fusesource.jansi:jansi)
+# Used for @Grab and Grapes:
+Requires:       mvn(org.apache.ivy:ivy)
 
 BuildArch:      noarch
 
@@ -58,10 +82,14 @@ Smalltalk.  It seamlessly integrates with all existing Java objects and
 libraries and compiles straight to Java byte-code so you can use it anywhere
 you can use Java.
 
+%package lib
+Summary:        Groovy JAR artifact
+%description lib
+This package contains Groovy JAR artifact.
+
 %package javadoc
 Summary:       API Documentation for %{name}
 Group:         Documentation
-Requires:      %{name} = %{version}-%{release}
 
 %description javadoc
 JavaDoc documentation for %{name}
@@ -76,6 +104,12 @@ cp %{SOURCE4} %{SOURCE5} %{SOURCE6} .
 %patch0 -p1
 %patch1 -p1
 
+# We don't want to generate auto-R on optional dependencies
+%pom_xpath_replace "pom:dependency[pom:optional[text()='true']]/pom:scope" "<scope>provided</scope>"
+
+%mvn_package : %{name}-lib
+%mvn_file : %{name}
+
 # fix aId for gmaven-runtime-1.8
 sed -i "s|<artifactId>groovy</artifactId>|<artifactId>%{name}</artifactId>|" pom.xml
 
@@ -149,17 +183,23 @@ install -p -m644 %{SOURCE2} \
         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-starter.conf
 
 
-%files -f .mfiles
+%files
 %{_bindir}/*
 %config(noreplace) %{_sysconfdir}/%{name}-starter.conf
 %doc README.md
 %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
 
+%files lib -f .mfiles-%{name}-lib
+%doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
+
 %files javadoc
 %{_javadocdir}/%{name}
 %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
 
 %changelog
+* Wed Aug 20 2014 Michal Srb <msrb at redhat.com> - 1.8.9-14
+- Introduce groovy-lib subpackage
+
 * Tue Aug 19 2014 Michal Srb <msrb at redhat.com> - 1.8.9-13
 - Add missing alias: org.codehaus.groovy:groovy18-all
 - Make this package compat again


More information about the scm-commits mailing list