]>
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 | |
7075a943 | 7 | Version: 3.0.6 |
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 |
7075a943 | 12 | # Source0-md5: aa590e6cc8bae924b154ff79d796e18f |
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 | |
af8f6314 JP |
33 | grep -rl /usr/bin/env bin | xargs sed -i -e '1{ |
34 | s,^#!.*bin/env sh,#!%{__sh}, | |
35 | s,^#!.*bin/env bash,#!%{__bash}, | |
36 | }' | |
c9a8a1f5 JP |
37 | |
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name}/bin} | |
41 | for b in grape groovy groovyConsole groovyc groovydoc groovysh java2groovy startGroovy; do | |
42 | ln -sf %{_datadir}/%{name}/bin/$b $RPM_BUILD_ROOT%{_bindir}/$b | |
43 | done | |
44 | ||
45 | install -d $RPM_BUILD_ROOT | |
1fddc059 JP |
46 | cp -a bin conf lib $RPM_BUILD_ROOT%{_datadir}/%{name} |
47 | ||
48 | %if %{with indy} | |
49 | for f in indy/*-indy.jar; do | |
50 | targetname=$(basename $f -indy.jar).jar | |
51 | %{__cp} -p $f \ | |
52 | $RPM_BUILD_ROOT%{_datadir}/%{name}/lib/$targetname | |
53 | done | |
54 | %endif | |
c9a8a1f5 JP |
55 | |
56 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}/bin/*.bat | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %attr(755,root,root) %{_bindir}/grape | |
64 | %attr(755,root,root) %{_bindir}/groovy | |
65 | %attr(755,root,root) %{_bindir}/groovyConsole | |
66 | %attr(755,root,root) %{_bindir}/groovyc | |
67 | %attr(755,root,root) %{_bindir}/groovydoc | |
68 | %attr(755,root,root) %{_bindir}/groovysh | |
69 | %attr(755,root,root) %{_bindir}/java2groovy | |
70 | %attr(755,root,root) %{_bindir}/startGroovy | |
71 | %dir %{_datadir}/%{name} | |
72 | %dir %{_datadir}/%{name}/bin | |
73 | %attr(755,root,root) %{_datadir}/%{name}/bin/grape | |
74 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovy | |
75 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovyConsole | |
76 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovyc | |
77 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovydoc | |
78 | %attr(755,root,root) %{_datadir}/%{name}/bin/groovysh | |
79 | %attr(755,root,root) %{_datadir}/%{name}/bin/java2groovy | |
80 | %attr(755,root,root) %{_datadir}/%{name}/bin/startGroovy | |
81 | %{_datadir}/%{name}/conf | |
c9a8a1f5 | 82 | %{_datadir}/%{name}/lib |