You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
3.8 KiB
103 lines
3.8 KiB
## |
|
## groovy.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# packaqge version |
|
%define V_groovy 1.7.2 |
|
%define V_gant 1.8.1 |
|
|
|
# package information |
|
Name: groovy |
|
Summary: Groovy Java Scripting Language |
|
URL: http://groovy.codehaus.org/ |
|
Vendor: Codehaus |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: Language |
|
License: BSD-style |
|
Version: %{V_groovy} |
|
Release: 20100408 |
|
|
|
# list of sources |
|
Source0: http://dist.codehaus.org/groovy/distributions/groovy-binary-%{V_groovy}.zip |
|
Source1: http://dist.codehaus.org/gant/distributions/gant-%{V_gant}.zip |
|
|
|
# build information |
|
BuildPreReq: OpenPKG, openpkg >= 20100101, infozip |
|
PreReq: OpenPKG, openpkg >= 20100101, java, JAVA-JDK |
|
|
|
%description |
|
Groovy is an agile and dynamic scripting language for the Java |
|
Virtual Machine (JVM). It builds upon the strengths of Java but has |
|
additional power features inspired by languages like Python, Ruby |
|
and Smalltalk. It can be used as a stand-alone or embedded scripting |
|
language for Java and provides full access to all existing Java |
|
class libraries. |
|
|
|
%track |
|
prog groovy = { |
|
version = %{V_groovy} |
|
url = http://dist.codehaus.org/groovy/distributions/ |
|
regex = groovy-binary-(\d+\.\d+(\.\d+)*)\.(?:zip|tar\.gz) |
|
} |
|
prog groovy:gant = { |
|
version = %{V_gant} |
|
url = http://dist.codehaus.org/gant/distributions/ |
|
regex = gant-(\d+\.\d+(\.\d+)*)_groovy-(\d+\.\d+(\.\d+)*)\.(?:zip|tar\.gz) |
|
} |
|
|
|
%prep |
|
%setup -q -T -c |
|
( cd .. |
|
%{l_prefix}/bin/unzip -q -x %{SOURCE0} |
|
) || exit $? |
|
%{l_prefix}/bin/unzip -q -x %{SOURCE1} |
|
|
|
%build |
|
|
|
%install |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/groovy |
|
for program in grok groovy groovyConsole groovyc groovysh java2groovy gant; do |
|
( echo "#!/bin/sh" |
|
echo "eval \`JAVA_PLATFORM=\"sun-jdk\" %{l_prefix}/bin/java-toolkit -e\`" |
|
echo "GROOVY_HOME=\"%{l_prefix}/libexec/groovy\"; export GROOVY_HOME" |
|
echo "exec %{l_prefix}/libexec/groovy/bin/$program \"\$@\"" |
|
) >$program.sh |
|
%{l_shtool} install -c -m 755 \ |
|
$program.sh $RPM_BUILD_ROOT%{l_prefix}/bin/$program |
|
done |
|
rm -f bin/*.bat bin/*cygwin* |
|
cp -rp bin conf embeddable lib \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/groovy/ |
|
%{l_shtool} install -c -m 755 \ |
|
gant-*/bin/gant $RPM_BUILD_ROOT%{l_prefix}/libexec/groovy/bin/ |
|
%{l_shtool} install -c -m 644 \ |
|
gant-*/lib/* $RPM_BUILD_ROOT%{l_prefix}/libexec/groovy/lib/ |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
|
|
|