2 # - build from source (get-source.sh fetches it)
4 %include /usr/lib/rpm/macros.java
5 Summary: Closure Compiler - JavaScript compressor
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: 1e23c299c8a8d0fa1f812ea8743bddcc
15 Source2: get-source.sh
16 Source3: gen-changes.sh
17 URL: http://closure-compiler.appspot.com/
18 BuildRequires: rpm-javaprov
19 BuildRequires: rpmbuild(macros) >= 1.300
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_bindir},%{_javadir}}
38 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
41 cp -p compiler.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
42 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
45 rm -rf $RPM_BUILD_ROOT
48 %defattr(644,root,root,755)
50 %attr(755,root,root) %{_bindir}/%{name}