[groovy] Migrate to %mvn_artifact
Michal Srb
msrb at fedoraproject.org
Mon Jun 23 12:28:08 UTC 2014
commit cb1fe87ea5e18e8ce74c7e526d087faac5b8e43a
Author: Michal Srb <msrb at redhat.com>
Date: Mon Jun 23 14:27:55 2014 +0200
Migrate to %mvn_artifact
- Fix dep on jline1 in run script
groovy-script | 2 +-
groovy.spec | 63 +++++++++++++++++---------------------------------------
2 files changed, 20 insertions(+), 45 deletions(-)
---
diff --git a/groovy-script b/groovy-script
index fec1335..ecf0e7b 100644
--- a/groovy-script
+++ b/groovy-script
@@ -68,7 +68,7 @@ BASE_JARS="$BASE_JARS commons-cli"
BASE_JARS="$BASE_JARS commons-logging"
BASE_JARS="$BASE_JARS groovy"
BASE_JARS="$BASE_JARS ivy"
-BASE_JARS="$BASE_JARS jline"
+BASE_JARS="$BASE_JARS jline1"
BASE_JARS="$BASE_JARS jsp"
BASE_JARS="$BASE_JARS junit"
BASE_JARS="$BASE_JARS servlet"
diff --git a/groovy.spec b/groovy.spec
index a2691d0..14dd587 100644
--- a/groovy.spec
+++ b/groovy.spec
@@ -4,16 +4,16 @@
Name: groovy
Version: 1.8.9
-Release: 11%{?dist}
+Release: 12%{?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
# by the EPL. We include copies of both for completeness.
# groovyConsole uses CC-BY licensed icons
# (see: subprojects/groovy-console/target/tmp/groovydoc/groovy/ui/icons/credits.txt)
License: ASL 2.0 and BSD and EPL and Public Domain and CC-BY
URL: http://groovy.codehaus.org/
+
Source0: http://dist.groovy.codehaus.org/distributions/%{name}-src-%{version}.zip
Source1: groovy-script
Source2: groovy-starter.conf
@@ -24,7 +24,6 @@ Source6: http://www.apache.org/licenses/LICENSE-2.0.txt
# http://jira.codehaus.org/browse/GROOVY-6085
Patch0: groovy-inner-interface-annotations.patch
Patch1: groovy-build-with-java8.patch
-BuildArch: noarch
BuildRequires: ant
BuildRequires: antlr-tool
@@ -43,27 +42,13 @@ BuildRequires: desktop-file-utils
BuildRequires: jpackage-utils
BuildRequires: apache-commons-cli
BuildRequires: unzip
-BuildRequires: ecj
-Requires: jpackage-utils
-
-# The are all runtime dependencies of the script
-# TODO: Think of splitting them into a separate subpackage
-Requires: ant
-Requires: ant-junit
-Requires: antlr-tool
-Requires: objectweb-asm3
-Requires: bsf
-Requires: apache-commons-cli
-Requires: apache-commons-logging
-Requires: apache-ivy
-Requires: jansi
-Requires: jline1
-Requires: tomcat-jsp-2.2-api
-Requires: junit
-Requires: tomcat-servlet-3.0-api
-Requires: xstream
-Requires: java-devel >= 1.8
+BuildRequires: javapackages-local
+BuildRequires: mvn(org.apache.ant:ant-junit)
+BuildRequires: mvn(org.apache.ant:ant-launcher)
+BuildRequires: mvn(javax.servlet:servlet-api)
+BuildRequires: mvn(javax.servlet:jsp-api)
+BuildArch: noarch
%description
Groovy is an agile and dynamic language for the Java Virtual Machine,
@@ -75,9 +60,6 @@ you can use Java.
%package javadoc
Summary: API Documentation for %{name}
-Group: Development/Tools
-Requires: %{name} = %{version}-%{release}
-Requires: jpackage-utils
%description javadoc
JavaDoc documentation for %{name}
@@ -91,6 +73,10 @@ find \( -name *.jar -o -name *.class \) -delete
%patch0 -p1
%patch1 -p1
+%pom_remove_dep org.codehaus.gpars:gpars
+%pom_change_dep jline:jline jline:jline:1
+%mvn_file : %{name}
+
%build
mkdir -p target/lib/{compile,tools}
@@ -108,10 +94,8 @@ ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \
createJars javadoc
%install
-
-# Code
-install -d $RPM_BUILD_ROOT%{_javadir}
-install -p -m644 target/dist/groovy.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+%mvn_artifact pom.xml target/dist/groovy.jar
+%mvn_install -J target/html/api/
# Startup scripts
install -d $RPM_BUILD_ROOT%{_bindir}
@@ -135,32 +119,23 @@ install -p -m644 src/main/groovy/ui/ConsoleIcon.png \
desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE3}
-# API Documentation
-install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-find target -type d |xargs chmod 755
-cp -rp target/html/api/. $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
-# Maven depmap
-install -d $RPM_BUILD_ROOT%{_mavenpomdir}
-install -p -m644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap
-
%files -f .mfiles
%defattr(-,root,root,-)
%{_bindir}/*
-%{_javadir}/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%config(noreplace) %{_sysconfdir}/*
%doc README.md
%doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
-
-%files javadoc
-%{_javadocdir}/*
+%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
%changelog
+* Sun Jun 22 2014 Michal Srb - 1.8.9-12
+- Migrate to %%mvn_artifact
+- Fix dep on jline1 in run script
+
* Mon Jun 16 2014 Michal Srb <msrb at redhat.com> - 1.8.9-11
- Fix FTBFS
More information about the scm-commits
mailing list