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