]>
Commit | Line | Data |
---|---|---|
1fddc059 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without indy # use libraries without invokedynamic support (compatible with JRE 1.5+) | |
4 | # | |
c9a8a1f5 JP |
5 | Summary: Dynamic language for the Java Platform |
6 | Name: groovy | |
8b0a11fd | 7 | Version: 2.5.8 |
b34adc18 | 8 | Release: 1 |
c9a8a1f5 JP |
9 | License: Apache v2.0 |
10 | Group: Development/Languages/Java | |
5ef63521 | 11 | Source0: https://dl.bintray.com/groovy/maven/apache-%{name}-binary-%{version}.zip |
8b0a11fd | 12 | # Source0-md5: 464fe2c0c8f5568ba71ef094daed5078 |
5ef63521 | 13 | URL: http://groovy-lang.org/ |
1fddc059 JP |
14 | %if %{with indy} |
15 | Requires: jdk >= 1.7 | |
16 | %else | |
17 | Requires: jdk >= 1.5 | |
18 | %endif | |
c9a8a1f5 JP |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
b6f61f02 JR |
22 | %define _noautoreq_java ClassDataVersion |
23 | ||
c9a8a1f5 JP |
24 | %description |
25 | Groovy is an agile and dynamic language for the Java Virtual Machine, | |
26 | built upon Java with features inspired by languages like Python, Ruby | |
27 | and Smalltalk. It seamlessly integrates with all existing Java objects | |
28 | and libraries and compiles straight to Java bytecode so you can use it | |
29 | anywhere you can use Java. | |
30 | ||
31 | %prep | |
32 | %setup -q | |
33 | ||
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
36 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name}/bin} | |
37 | for b in grape groovy groovyConsole groovyc groovydoc groovysh java2groovy startGroovy; do | |
38 | ln -sf %{_datadir}/%{name}/bin/$b $RPM_BUILD_ROOT%{_bindir}/$b | |
39 | done | |
40 | ||
41 | install -d $RPM_BUILD_ROOT | |
1fddc059 JP |
42 | cp -a bin conf lib $RPM_BUILD_ROOT%{_datadir}/%{name} |
43 | ||
44 | %if %{with indy} | |
45 | for f in indy/*-indy.jar; do | |
46 | targetname=$(basename $f -indy.jar).jar | |
47 | %{__cp} -p $f \ | |
48 | $RPM_BUILD_ROOT%{_datadir}/%{name}/lib/$targetname | |
49 | done | |
50 | %endif | |
c9a8a1f5 JP |
51 | |
52 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/bin/*.bat | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
59 | %attr(755,root,root) %{_bindir}/grape | |
60 | %attr(755,root,root) %{_bindir}/groovy | |
61 | %attr(755,root,root) %{_bindir}/groovyConsole | |
62 | %attr(755,root,root) %{_bindir}/groovyc | |
63 | %attr(755,root,root) %{_bindir}/groovydoc | |
64 | %attr(755,root,root) %{_bindir}/groovysh | |
65 | %attr(755,root,root) %{_bindir}/java2groovy | |
66 | %attr(755,root,root) %{_bindir}/startGroovy | |
67 | %dir %{_datadir}/%{name} | |
68 | %dir %{_datadir}/%{name}/bin | |
69 | %attr(755,root,root) %{_datadir}/%{name}/bin/grape | |
70 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovy | |
71 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovyConsole | |
72 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovyc | |
73 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovydoc | |
74 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovysh | |
75 | %attr(755,root,root) %{_datadir}/%{name}/bin/java2groovy | |
76 | %attr(755,root,root) %{_datadir}/%{name}/bin/startGroovy | |
77 | %{_datadir}/%{name}/conf | |
c9a8a1f5 | 78 | %{_datadir}/%{name}/lib |