# 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. %global majorversion 1.8 Name: groovy18 Version: 1.8.9 Release: 2%{?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 # thanks to Michal Srb and Mikolaj Izdebski, and Tom Callaway 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/groovy-src-1.8.9.zip # thanks to Johannes Lips and Matt Spaulding Source1: groovy18-script Source2: groovy18-starter.conf Source4: cpl-v10.txt Source5: epl-v10.txt Source6: http://www.apache.org/licenses/LICENSE-2.0.txt # thanks to Andy Grimm Patch0: groovy-inner-interface-annotations.patch BuildRequires: java-devel >= 1.6 BuildRequires: jpackage-utils BuildRequires: ant BuildRequires: antlr-tool BuildRequires: ant-antlr BuildRequires: apache-commons-cli BuildRequires: apache-ivy BuildRequires: bsf BuildRequires: ecj BuildRequires: jansi BuildRequires: jline BuildRequires: junit BuildRequires: tomcat-jsp-2.2-api BuildRequires: tomcat-servlet-3.0-api BuildRequires: objectweb-asm BuildRequires: xstream Requires: ant Requires: ant-junit Requires: antlr-tool Requires: apache-commons-cli Requires: apache-commons-logging Requires: apache-ivy Requires: bsf Requires: jansi Requires: jline Requires: junit Requires: objectweb-asm Requires: tomcat-jsp-2.2-api # thanks to Alexander Kurtakov Requires: tomcat-servlet-3.0-api Requires: xstream Requires: java-devel >= 1.6 Requires: jpackage-utils 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 byte-code so you can use it anywhere you can use Java. %package javadoc Summary: API Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description javadoc JavaDoc documentation for %{name} %prep %setup -q -n groovy-%{version} find . -name "*.class" -delete find . -name "*.jar" -delete cp %{SOURCE4} %{SOURCE5} %{SOURCE6} . %patch0 -p1 # fix aId for gmaven-runtime-1.8 sed -i "s|groovy|%{name}|" pom.xml # unavailable runtime dep (for the moment... https://bugzilla.redhat.com/show_bug.cgi?id=854239 ) %pom_remove_dep org.codehaus.gpars:gpars # java 7 apis %pom_remove_dep org.livetribe:livetribe-jsr223 # explicit tomcat apis sed -i "s|javax.servlet|org.apache.tomcat|" pom.xml sed -i "s|jsp-api|tomcat-jsp-api|" pom.xml sed -i "s|2.0|any|" pom.xml sed -i "s|servlet-api|tomcat-servlet-api|" pom.xml sed -i "s|2.4|any|" pom.xml # fix non ASCII chars for s in src/main/groovy/transform/NotYetImplemented.java\ src/main/org/codehaus/groovy/transform/NotYetImplementedASTTransformation.java;do native2ascii -encoding UTF8 ${s} ${s} done %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 # thanks to Mikolaj Izdebski # Use ECJ instead of OpenJDK to compile MethodHandle. This is a # workaround for a bug in OpenJDK that causes compilation of # MethodHandle to take many minutes (15min or even more), while ECJ # can compile it under five seconds. See rhbz#971483 and # http://mail.openjdk.java.net/pipermail/compiler-dev/2013-May/006339.html ecj -d target/classes `find -name MethodHandle.java -o -name ArrayUtil.java` # Build # TODO: Build at least tests, maybe examples export CLASSPATH=$(build-classpath ant/ant-antlr) 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}/%{name} for TOOL in grape18 %{name}c %{name}Console java2%{name} %{name}sh do ln $RPM_BUILD_ROOT%{_bindir}/%{name} \ $RPM_BUILD_ROOT%{_bindir}/$TOOL done # Configuration 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 %{_bindir}/* %{_javadir}/%{name}-*.jar %{_mavenpomdir}/JPP-%{name}-*.pom %{_mavendepmapfragdir}/%{name} %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 javadoc %{_javadocdir}/%{name} %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt %changelog * Tue Jun 11 2013 gil cattaneo - 1.8.9-2 - packaged as a compatibility package * Sat Apr 20 2013 gil cattaneo - 1.8.9-1 - Updated to upstream version 1.8.9 - renamed and rebuilt for gmaven * Thu Apr 11 2013 Matt Spaulding - 1.8.8-4 - Now accepts classpath argument (RHBZ #810885) * Mon Apr 8 2013 Andy Grimm - 1.8.8-3 - Apply patch for GROOVY-6085 (RHBZ #949352) * Thu Feb 14 2013 Fedora Release Engineering - 1.8.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Nov 27 2012 Tom Callaway - 1.8.8-1 - Update to 1.8.8 - Fix licensing issues * Wed Jul 25 2012 Johannes Lips - 1.8.7-1 - Update to 1.8.7 * Thu Jul 19 2012 Fedora Release Engineering - 1.8.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Mar 21 2012 Alexander Kurtakov 1.8.6-4 - Move to tomcat v7 apis. - Guideline fixes. * Fri Mar 09 2012 Johannes Lips - 1.8.6-3 - fixed the path of jvm in the startup script * Sat Mar 03 2012 Johannes Lips - 1.8.6-2 - fixed the startup script by adding jansi as dep * Wed Feb 22 2012 Johannes Lips - 1.8.6-1 - Update to 1.8.6 * Tue Jan 03 2012 Johannes Lips - 1.8.5-1 - Update to 1.8.5 * Sun Nov 20 2011 Johannes Lips - 1.8.4-1 - Update to 1.8.4 * Thu Oct 13 2011 Johannes Lips - 1.8.3-2 - remove the nojansi patch since jansi is in fedora * Thu Oct 13 2011 Johannes Lips - 1.8.3-1 - Update to 1.8.3 * Tue Sep 06 2011 Johannes Lips - 1.8.2-1 - Update to 1.8.2 * Sat Aug 13 2011 Johannes Lips - 1.8.1-3 - adjusted the maven pom dir * Sat Aug 13 2011 Johannes Lips - 1.8.1-2 - updated the nojansi patch * Sat Aug 13 2011 Johannes Lips - 1.8.1-1 - Update to 1.8.1 * Wed May 04 2011 Johannes Lips - 1.8.0-2 - Minor changes to reflect changes to packaging guidelines * Fri Apr 29 2011 Johannes Lips - 1.8.0-1 - Update to 1.8.0 * Wed Feb 09 2011 Fedora Release Engineering - 1.7.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sat Nov 6 2010 Alexander Kurtakov 1.7.2-3 - Build with servlet and jsp apis from tomcat6. * Thu Jun 17 2010 Lubomir Rintel - 1.7.2-2 - Fix a typo * Tue Apr 20 2010 Lubomir Rintel - 1.7.2-1 - Bump version * Fri Apr 02 2010 Lubomir Rintel - 1.7.1-1 - Bump version - Revert addition of jansi dependency * Fri Apr 02 2010 Lubomir Rintel - 1.7.0-2 - Add maven depmap * Wed Feb 17 2010 Lubomir Rintel - 1.7.0-1 - New upstream version - Use asm 3.1 instead of asm2 * Wed Dec 04 2009 Lubomir Rintel - 1.6.7-1 - New upstream version - Make Jochen happy * Thu Dec 03 2009 Lubomir Rintel - 1.6.6-2 - Build with OpenJDK * Mon Nov 30 2009 Lubomir Rintel - 1.6.6-1 - Bump to 1.6.6 - Don't mistakenly require itself (Jochen Schmitt, #534168#c3) * Fri Nov 27 2009 Lubomir Rintel - 1.6.5-2 - Hopefully fix mockbuild * Mon Nov 09 2009 Lubomir Rintel - 1.6.5-1 - Initial Fedora packaging