]>
Commit | Line | Data |
---|---|---|
65a15527 ER |
1 | # TODO |
2 | # - build from source | |
3 | # - NOTE: build-data.properties is included twice in .jar | |
4 | ||
5 | %include /usr/lib/rpm/macros.java | |
6 | Summary: Closure Compiler - JavaScript compressor | |
7 | Name: closure-compiler | |
8 | Version: 20100201 | |
9 | Release: 0.1 | |
10 | License: Apache v2.0 | |
11 | Group: Applications/WWW | |
12 | Source0: http://closure-compiler.googlecode.com/files/compiler-%{version}.tar.gz | |
13 | # Source0-md5: 71bb4f8975ffc81fd0b9a82e18318a49 | |
14 | URL: http://closure-compiler.appspot.com/ | |
15 | BuildRequires: rpm-javaprov | |
16 | BuildRequires: rpmbuild(macros) >= 1.300 | |
17 | BuildArch: noarch | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | Closure Compiler is a JavaScript optimizing compiler. It parses your | |
22 | JavaScript, analyzes it, removes dead code and rewrites and minimizes | |
23 | what's left. It also checks syntax, variable references, and types, | |
24 | and warns about common JavaScript pitfalls. It is used in many of | |
25 | Google's JavaScript apps, including Gmail, Google Web Search, Google | |
26 | Maps, and Google Docs. | |
27 | ||
28 | %prep | |
29 | %setup -qc | |
30 | ||
31 | cat <<'EOF' >> %{name} | |
32 | #!/bin/sh | |
33 | exec java -jar %{_javadir}/%{name}.jar "$@" | |
34 | EOF | |
35 | ||
36 | %install | |
37 | rm -rf $RPM_BUILD_ROOT | |
38 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_javadir}} | |
39 | install -p %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} | |
40 | ||
41 | # jars | |
42 | cp -a 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 | |
51 | %attr(755,root,root) %{_bindir}/%{name} | |
52 | %{_javadir}/*.jar |