[groovy18] Migrate to mvn_artifact
Michal Srb
msrb at fedoraproject.org
Mon Aug 18 07:24:53 UTC 2014
commit e7d7157157cd6c1c1a9c523fd185e1e09e9d0ae2
Author: Michal Srb <msrb at redhat.com>
Date: Mon Aug 18 09:22:15 2014 +0200
Migrate to mvn_artifact
- Fix location of ivy artifact
groovy18-script | 2 +-
groovy18.spec | 65 +++++++++++++++++++++---------------------------------
2 files changed, 26 insertions(+), 41 deletions(-)
---
diff --git a/groovy18-script b/groovy18-script
index 319c979..d6a044d 100644
--- a/groovy18-script
+++ b/groovy18-script
@@ -67,7 +67,7 @@ BASE_JARS="$BASE_JARS bsf"
BASE_JARS="$BASE_JARS commons-cli"
BASE_JARS="$BASE_JARS commons-logging"
BASE_JARS="$BASE_JARS groovy18-1.8"
-BASE_JARS="$BASE_JARS ivy"
+BASE_JARS="$BASE_JARS apache-ivy/ivy"
BASE_JARS="$BASE_JARS jline1/jline-1"
BASE_JARS="$BASE_JARS jsp"
BASE_JARS="$BASE_JARS junit"
diff --git a/groovy18.spec b/groovy18.spec
index 77a5a1d..2ddbe20 100644
--- a/groovy18.spec
+++ b/groovy18.spec
@@ -4,7 +4,7 @@
%global majorversion 1.8
Name: groovy18
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
@@ -24,41 +24,31 @@ Source6: http://www.apache.org/licenses/LICENSE-2.0.txt
Patch0: groovy-inner-interface-annotations.patch
Patch1: groovy-build-with-java8.patch
-BuildRequires: java-devel >= 1.8
-BuildRequires: jpackage-utils
-
BuildRequires: ant
BuildRequires: antlr-tool
BuildRequires: ant-antlr
-BuildRequires: apache-commons-cli
-BuildRequires: apache-ivy
+BuildRequires: objectweb-asm3
BuildRequires: bsf
+BuildRequires: apache-ivy
BuildRequires: jansi
BuildRequires: jline1
-BuildRequires: junit
BuildRequires: tomcat-jsp-2.2-api
+BuildRequires: junit
BuildRequires: tomcat-servlet-3.0-api
-BuildRequires: objectweb-asm3
BuildRequires: xstream
+BuildRequires: java-devel >= 1.8
+BuildRequires: desktop-file-utils
+BuildRequires: jpackage-utils
+BuildRequires: apache-commons-cli
+BuildRequires: unzip
+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)
+
+Requires: java-devel >= 1.6
-Requires: ant
-Requires: ant-junit
-Requires: antlr-tool
-Requires: apache-commons-cli
-Requires: apache-commons-logging
-Requires: apache-ivy
-Requires: bsf
-Requires: jansi
-Requires: jline1
-Requires: junit
-Requires: objectweb-asm3
-Requires: tomcat-jsp-2.2-api
-# thanks to Alexander Kurtakov
-Requires: tomcat-servlet-3.0-api
-Requires: xstream
-
-Requires: java-devel >= 1.8
-Requires: jpackage-utils
BuildArch: noarch
%description
@@ -117,6 +107,8 @@ find . -name "*.groovy" -exec sed -i 's|org.objectweb.asm|org.objectweb.distrosh
%pom_change_dep :asm-analysis :asm-analysis-distroshaded
%pom_change_dep :asm-tree :asm-tree-distroshaded
+%mvn_file : %{name}
+
%build
mkdir -p target/lib/{compile,tools}
@@ -125,7 +117,7 @@ build-jar-repository target/lib/compile servlet jsp \
objectweb-asm3/asm-tree-distroshaded objectweb-asm3/asm-distroshaded \
objectweb-asm3/asm-util-distroshaded objectweb-asm3/asm-analysis-distroshaded \
antlr ant/ant-antlr antlr \
- bsf jline1/jline-1 xstream ant junit ivy commons-cli \
+ bsf jline1/jline-1 xstream ant junit apache-ivy commons-cli \
jansi
# Build
@@ -136,10 +128,8 @@ ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \
%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}
@@ -155,15 +145,6 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m644 %{SOURCE2} \
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-starter.conf
-# 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 JPP-%{name}.pom %{name}.jar -a "org.codehaus.groovy:%{name}-all" -v "%{majorversion}"
%files -f .mfiles
%{_bindir}/*
@@ -176,6 +157,10 @@ install -p -m644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
%doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
%changelog
+* Mon Aug 18 2014 Michal Srb <msrb at redhat.com> - 1.8.9-12
+- Migrate to mvn_artifact
+- Fix location of ivy artifact
+
* Mon Jun 16 2014 Michal Srb <msrb at redhat.com> - 1.8.9-11
- Fix FTBFS
More information about the scm-commits
mailing list