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