rpms/groovy/F-11 groovy-1.6.5-build.patch, NONE, 1.1 groovy-script, NONE, 1.1 groovy-starter.conf, NONE, 1.1 groovy.desktop, NONE, 1.1 groovy.spec, NONE, 1.1 sources, 1.1, 1.2

Lubomir Rintel lkundrak at fedoraproject.org
Wed Dec 9 18:18:09 UTC 2009


Author: lkundrak

Update of /cvs/pkgs/rpms/groovy/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22316/F-11

Modified Files:
	sources 
Added Files:
	groovy-1.6.5-build.patch groovy-script groovy-starter.conf 
	groovy.desktop groovy.spec 
Log Message:
Import groovy

groovy-1.6.5-build.patch:
 build.xml |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE groovy-1.6.5-build.patch ---
This fixes build on openSUSE 11.2

ant seems to produce incorrect parameter list to javac.

  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed, deprecation: deprecation (No such file or directory)

diff -up groovy-1.6.5/build.xml.japierdole groovy-1.6.5/build.xml
--- groovy-1.6.5/build.xml.japierdole	2009-11-16 10:14:52.336014552 +0100
+++ groovy-1.6.5/build.xml	2009-11-16 10:17:19.785011792 +0100
@@ -190,7 +190,8 @@ $Date: 2009-09-12 02:39:39 +0200 (Sa, 12
                 <pathelement path="${mainClassesDirectory}"/>
                 <path refid="compilePath"/>
             </classpath>
-            <javac deprecation="on" debug="yes" source="1.5" target="1.5"/>
+            <!-- javac deprecation="on" debug="yes" source="1.5" target="1.5"/-->
+            <javac debug="yes"/>
         </groovyc>
     </target>
 


--- NEW FILE groovy-script ---
#!/bin/sh
# 
# Groovy script
# Lubomir Rintel <lkundrak at v3.sk>

# Packagers: When updating the package be sure to check
# all this against against the upstream binary package

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then 
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Configuration
SCRIPT_PATH=$0
PROGNAME=$(basename $SCRIPT_PATH)
GROOVY_CONF=/etc/groovy-starter.conf
TOOLS_JAR=$(build-classpath ../jvm/java/lib/tools)
STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter
MAIN_CLASS=$STARTER_MAIN_CLASS

# Wrappers
[ $PROGNAME = grape ]		&& CLASS=org.codehaus.groovy.tools.GrapeMain
[ $PROGNAME = groovy ]		&& CLASS=groovy.ui.GroovyMain
[ $PROGNAME = groovyc ]		&& CLASS=org.codehaus.groovy.tools.FileSystemCompiler
[ $PROGNAME = groovyConsole ]	&& CLASS=groovy.ui.Console
[ $PROGNAME = java2groovy ]	&& CLASS=org.codehaus.groovy.antlr.java.Java2GroovyMain
[ $PROGNAME = groovysh ]	&& CLASS=org.codehaus.groovy.tools.shell.Main
[ $PROGNAME = groovysh ]	&& [ "$OLDSHELL" ] && CLASS=groovy.ui.InteractiveShell

# Load system-wide configuration
if [ -f /etc/groovy.conf ]; then
  . /etc/groovy.conf
fi

# Load user configuration
[ -f "$HOME/.groovyrc" ] && . "$HOME/.groovyrc"
[ -f "$HOME/.groovy/startup" ] && . "$HOME/.groovy/startup"

# Bail out if there's nothing to run
if [ -z "$CLASS" ]
then
	echo "Can not determine main class for '$PROGNAME'" >&2
	exit 1
fi

# JVM options
GROOVY_OPTS="$GROOVY_OPTS -Dscript.name=$SCRIPT_PATH"
GROOVY_OPTS="$GROOVY_OPTS -Dprogram.name=$PROGNAME"
GROOVY_OPTS="$GROOVY_OPTS -Dgroovy.starter.conf=$GROOVY_CONF"
GROOVY_OPTS="$GROOVY_OPTS -Dgroovy.home=$GROOVY_HOME"
GROOVY_OPTS="$GROOVY_OPTS -Dtools.jar=$TOOLS_JAR"

# Do not forget about RPM dependencies!
BASE_JARS="$BASE_JARS ant"
BASE_JARS="$BASE_JARS ant/ant-junit"
BASE_JARS="$BASE_JARS ant-launcher"
BASE_JARS="$BASE_JARS antlr"
BASE_JARS="$BASE_JARS asm2/asm2"
BASE_JARS="$BASE_JARS asm2/asm2-analysis"
BASE_JARS="$BASE_JARS asm2/asm2-tree"
BASE_JARS="$BASE_JARS asm2/asm2-util"
BASE_JARS="$BASE_JARS bsf"
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 jsp_2_0_api"
BASE_JARS="$BASE_JARS junit"
BASE_JARS="$BASE_JARS servlet_2_4_api"
BASE_JARS="$BASE_JARS xstream"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $GROOVY_OPTS

# Let's start
run --conf "$GROOVY_CONF" --main "$CLASS" "$@"


***** Error reading new file: [Errno 2] No such file or directory: 'groovy-starter.conf'

--- NEW FILE groovy.desktop ---
[Desktop Entry]
Version=1.0
Name=Groovy Console
GenericName=Groovy Console
Comment=Evaluate scripts in Groovy language
Type=Application
Categories=Development;IDE;Java;
Exec=groovyConsole %F
TryExec=groovyConsole
StartupNotify=true
Icon=groovy


--- NEW FILE groovy.spec ---
# 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.6.7
Release:        1%{?dist}
Summary:        Agile dynamic language for the Java Platform

Group:          Development/Languages
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
Patch0:         groovy-1.6.5-build.patch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch:      noarch

BuildRequires:  ant
BuildRequires:  antlr
BuildRequires:  ant-antlr
BuildRequires:  asm2
BuildRequires:  bsf
BuildRequires:  apache-ivy
BuildRequires:  jline
BuildRequires:  jsp_2_0_api
BuildRequires:  junit
BuildRequires:  servlet_2_4_api
BuildRequires:  xstream
BuildRequires:  java-devel >= 1.6
BuildRequires:  desktop-file-utils
BuildRequires:  jpackage-utils
BuildRequires:  jakarta-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
Requires:       asm2
Requires:       bsf
Requires:       jakarta-commons-cli
Requires:       jakarta-commons-logging
Requires:       ivy
Requires:       jline
Requires:       jsp_2_0_api
Requires:       junit
Requires:       servlet_2_4_api
Requires:       xstream


%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/Tools
Requires:       %{name} = %{version}-%{release}

%description javadoc
JavaDoc documentation for %{name}


%prep
%setup -q
%patch0 -p1 -b .japierdole


%build
mkdir -p target/lib/{compile,tools}

# Construct classpath
build-jar-repository target/lib/compile servlet_2_4_api jsp_2_0_api \
        asm2/asm2-tree asm2/asm2 asm2/asm2-util \
        asm2/asm2-analysis antlr ant/ant-antlr antlr \
        bsf jline xstream ant junit ivy commons-cli

# Build
# TODO: Build at least tests, maybe examples
ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \
        createJars javadoc


%install
rm -rf $RPM_BUILD_ROOT

# Code
install -d $RPM_BUILD_ROOT%{_javadir}
install -p -m644 target/dist/groovy.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -sf %{name}-%{version}.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}-%{version}
find target -type d |xargs chmod 755
cp -rp target/html/api/. $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_javadir}/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*
%config(noreplace) %{_sysconfdir}/*
%doc LICENSE.txt NOTICE.txt README.txt 


%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/*


%changelog
* Wed Dec 04 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.6.7-1
- New upstream version
- Make Jochen happy

* Thu Dec 03 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.6.6-2
- Build with OpenJDK

* Mon Nov 30 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.6.6-1
- Bump to 1.6.6
- Don't mistakenly require itself (Jochen Schmitt, #534168#c3)

* Fri Nov 27 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.6.5-2
- Hopefully fix mockbuild

* Mon Nov 09 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.6.5-1
- Initial Fedora packaging


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/groovy/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	9 Dec 2009 17:54:44 -0000	1.1
+++ sources	9 Dec 2009 18:18:09 -0000	1.2
@@ -0,0 +1 @@
+f63532d75560f101bf1f40b7a3760228  groovy-src-1.6.7.zip




More information about the scm-commits mailing list