# Note to packagers: When rebasing this to a later version, do not # forget to ensure that sources 1 and 2 are up to date as well as # the Requires list. Name: groovy Version: 1.8.7 Release: %mkrel 2 Summary: Dynamic language for the Java Platform Group: Development/Java License: ASL 2.0 URL: http://groovy.codehaus.org/ Source0: http://dist.groovy.codehaus.org/distributions/%{name}-src-%{version}.zip Source1: groovy-script Source2: groovy-starter.conf Source3: groovy.desktop BuildArch: noarch BuildRequires: ant BuildRequires: antlr-tool BuildRequires: ant-antlr BuildRequires: objectweb-asm BuildRequires: bsf BuildRequires: apache-ivy BuildRequires: jansi BuildRequires: jline BuildRequires: tomcat-jsp-2.2-api BuildRequires: junit BuildRequires: tomcat-servlet-3.0-api BuildRequires: xstream BuildRequires: java-devel >= 1.6 BuildRequires: desktop-file-utils BuildRequires: jpackage-utils BuildRequires: apache-commons-cli BuildRequires: unzip 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-asm Requires: bsf Requires: apache-commons-cli Requires: apache-commons-logging Requires: apache-ivy Requires: jansi Requires: jline Requires: tomcat-jsp-2.2-api Requires: junit Requires: tomcat-servlet-3.0-api Requires: xstream Obsoletes: groovy18 < 1.8.6-2 Provides: groovy18 = %version-release %description Groovy is an agile and dynamic language for the Java Virtual Machine, built upon Java with features inspired by languages like Python, Ruby and Smalltalk. It seamlessly integrates with all existing Java objects and libraries and compiles straight to Java bytecode so you can use it anywhere you can use Java. %package javadoc Summary: API Documentation for %{name} Group: Development/Java Requires: %{name} = %{version}-%{release} Requires: jpackage-utils Obsoletes: groovy18-javadoc < 1.8.6-2 Provides: groovy18-javadoc = %version-release %description javadoc JavaDoc documentation for %{name} %prep %setup -q %build mkdir -p target/lib/{compile,tools} # Construct classpath build-jar-repository target/lib/compile servlet jsp \ objectweb-asm/asm-tree objectweb-asm/asm \ objectweb-asm/asm-util objectweb-asm/asm-analysis \ antlr ant/ant-antlr antlr \ bsf jline xstream ant junit ivy commons-cli \ jansi # Build # TODO: Build at least tests, maybe examples 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 # Startup scripts install -d $RPM_BUILD_ROOT%{_bindir} install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/groovy for TOOL in grape groovyc groovyConsole java2groovy groovysh do ln $RPM_BUILD_ROOT%{_bindir}/groovy \ $RPM_BUILD_ROOT%{_bindir}/$TOOL done # Configuration install -d $RPM_BUILD_ROOT%{_sysconfdir} install -p -m644 %{SOURCE2} \ $RPM_BUILD_ROOT%{_sysconfdir}/groovy-starter.conf # Desktop icon install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps install -d $RPM_BUILD_ROOT%{_datadir}/applications install -p -m644 src/main/groovy/ui/ConsoleIcon.png \ $RPM_BUILD_ROOT%{_datadir}/pixmaps/groovy.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 JPP-%{name}.pom %{name}.jar %files %defattr(-,root,root,-) %{_bindir}/* %{_javadir}/* %{_datadir}/pixmaps/* %{_datadir}/applications/* %{_mavendepmapfragdir}/* %{_mavenpomdir}/* %config(noreplace) %{_sysconfdir}/* %doc LICENSE.txt NOTICE.txt README.md %files javadoc %{_javadocdir}/* %changelog * Sat Jan 12 2013 umeabot <umeabot> 1.8.7-2.mga3 + Revision: 352649 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Sep 17 2012 dmorgan <dmorgan> 1.8.7-1.mga3 + Revision: 295302 - Fix group/provides - New version 1.8.7 * Sun Sep 09 2012 dmorgan <dmorgan> 1.8.6-1.mga3 + Revision: 290766 - Use groovy 1.8 as default groovy * Wed Aug 22 2012 dmorgan <dmorgan> 1.7.10-5.mga3 + Revision: 283073 - Remove ant-junit as Requires for now ( mga #2516) * Thu Dec 22 2011 gil <gil> 1.7.10-4.mga2 + Revision: 185652 - build fix edit desktop file change icon name * Thu Dec 08 2011 gil <gil> 1.7.10-3.mga2 + Revision: 178983 - corrected groovy17-all link * Tue Aug 30 2011 gil <gil> 1.7.10-2.mga2 + Revision: 136788 - edit desktop file - Revert to groovy 1.7.10 - update to 1.8.1 - edit spec file, added groovy-all jar required by gradle * Thu Apr 28 2011 dmorgan <dmorgan> 1.7.10-2.mga1 + Revision: 92450 - Rebuild after bootstrapping - imported package groovy