# 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.9 %define subrel 1 Release: %mkrel 5 Summary: Dynamic language for the Java Platform Group: Development/Java # 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 Source3: groovy.desktop Source4: cpl-v10.txt Source5: epl-v10.txt 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 Patch2: groovy-1.8.9-CVE-2015-3253.patch BuildRequires: ant BuildRequires: antlr-tool BuildRequires: ant-antlr BuildRequires: objectweb-asm3 BuildRequires: bsf BuildRequires: apache-ivy BuildRequires: jansi BuildRequires: jline1 BuildRequires: tomcat-jsp-2.2-api BuildRequires: junit BuildRequires: tomcat-servlet-3.0-api 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: %{name}-lib = %{version}-%{release} # 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 %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 lib Summary: Groovy JAR artifact Conflicts: %name < 1.8.9-1 Obsoletes: %name < 1.8.9-1 %description lib This package contains Groovy JAR artifact. %package javadoc Summary: API Documentation for %{name} Group: Documentation %description javadoc JavaDoc documentation for %{name} %prep %setup -q cp %{SOURCE4} %{SOURCE5} %{SOURCE6} . # Remove bundled JARs and classes find \( -name *.jar -o -name *.class \) -delete %patch0 -p1 %patch1 -p1 %patch2 -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} %pom_remove_dep org.codehaus.gpars:gpars %pom_change_dep jline:jline jline:jline:1 %build mkdir -p target/lib/{compile,tools} # Construct classpath build-jar-repository target/lib/compile servlet jsp \ objectweb-asm3/asm-tree objectweb-asm3/asm \ objectweb-asm3/asm-util objectweb-asm3/asm-analysis \ antlr ant/ant-antlr antlr \ bsf jline1 xstream ant junit apache-ivy commons-cli \ jansi # Build # TODO: Build at least tests, maybe examples ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ createJars javadoc %install %mvn_artifact pom.xml target/dist/groovy.jar %mvn_install -J target/html/api/ # 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} %files %defattr(-,root,root,-) %{_bindir}/* %{_datadir}/pixmaps/* %{_datadir}/applications/* %config(noreplace) %{_sysconfdir}/* %doc README.md %files lib -f .mfiles-%{name}-lib %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt %files javadoc -f .mfiles-javadoc %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt %changelog * Mon Jul 27 2015 luigiwalser <luigiwalser> 1.8.9-5.1.mga5 + Revision: 858310 - add upstream patch to fix CVE-2015-3253 * Fri May 15 2015 neoclust <neoclust> 1.8.9-5.mga5 + Revision: 822125 - Fix upgrade from mga4 * Thu Jan 08 2015 pterjan <pterjan> 1.8.9-4.mga5 + Revision: 809334 - Rebuild to fix antlr dependency * Sun Jan 04 2015 alexl <alexl> 1.8.9-3.mga5 + Revision: 808386 - Update desktop file (sync with Fedora Rawhide) * Sat Dec 27 2014 pterjan <pterjan> 1.8.9-2.mga5 + Revision: 806416 - Clean rebuild - Sync with Fedora 21 (update to 1.8.9) * Mon Nov 24 2014 anssi <anssi> 1.8.7-9.mga5 + Revision: 798736 - fix wrong rpm require on jline, replacing with jline1 instead * Sun Nov 23 2014 alexl <alexl> 1.8.7-8.mga5 + Revision: 798497 - translated desktop file into Russian * Fri Nov 21 2014 anssi <anssi> 1.8.7-7.mga5 + Revision: 798132 - actually use asm3 at runtime as well to fix runtime java error - use jline1, fixes build - fix build with java 1.8 (patch from Fedora) + umeabot <umeabot> - Second Mageia 5 Mass Rebuild - Mageia 5 Mass Rebuild * Mon May 05 2014 colin <colin> 1.8.7-4.mga5 + Revision: 620211 - Properly switch to objectweb-asm3 - Require objectweb-asm3 (not the latest which is asm5) * Fri Oct 18 2013 umeabot <umeabot> 1.8.7-3.mga4 + Revision: 505284 - Mageia 4 Mass Rebuild * 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