]>
Commit | Line | Data |
---|---|---|
65a15527 | 1 | # TODO |
59a6cf4b | 2 | # - build from source (get-source.sh fetches it) |
65a15527 ER |
3 | |
4 | %include /usr/lib/rpm/macros.java | |
5 | Summary: Closure Compiler - JavaScript compressor | |
6 | Name: closure-compiler | |
f19ea0eb | 7 | Version: 20111114 |
baab7897 | 8 | Release: 1 |
65a15527 ER |
9 | License: Apache v2.0 |
10 | Group: Applications/WWW | |
f19ea0eb | 11 | # Source0Download: https://code.google.com/p/closure-compiler/downloads/list |
65a15527 | 12 | Source0: http://closure-compiler.googlecode.com/files/compiler-%{version}.tar.gz |
f19ea0eb | 13 | # Source0-md5: fb176781e26b0de088777db9f88dcc05 |
8055adf6 | 14 | Source1: %{name}.sh |
59a6cf4b | 15 | Source2: get-source.sh |
65a15527 ER |
16 | URL: http://closure-compiler.appspot.com/ |
17 | BuildRequires: rpm-javaprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.300 | |
19 | BuildArch: noarch | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
baab7897 ER |
23 | The Closure Compiler is a tool for making JavaScript download and run |
24 | faster. It is a true compiler for JavaScript. Instead of compiling | |
25 | from a source language to machine code, it compiles from JavaScript to | |
26 | better JavaScript. It parses your JavaScript, analyzes it, removes | |
27 | dead code and rewrites and minimizes what's left. It also checks | |
28 | syntax, variable references, and types, and warns about common | |
29 | JavaScript pitfalls. | |
65a15527 ER |
30 | |
31 | %prep | |
32 | %setup -qc | |
33 | ||
65a15527 ER |
34 | %install |
35 | rm -rf $RPM_BUILD_ROOT | |
36 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_javadir}} | |
8055adf6 | 37 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name} |
65a15527 ER |
38 | |
39 | # jars | |
abb53a63 | 40 | cp -p compiler.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar |
65a15527 ER |
41 | ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar |
42 | ||
43 | %clean | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %files | |
47 | %defattr(644,root,root,755) | |
48 | %doc README | |
49 | %attr(755,root,root) %{_bindir}/%{name} | |
50 | %{_javadir}/*.jar |