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