]> git.pld-linux.org Git - packages/yuicompressor.git/blob - yuicompressor.spec
up to 2.4.8
[packages/yuicompressor.git] / yuicompressor.spec
1 # TODO
2 # - use rhino from PLD package
3 # - do not embed jargs into yuicompressor.jar
4 #
5 # Conditional build:
6 %bcond_without  tests           # don't build and run tests
7
8 %include        /usr/lib/rpm/macros.java
9 Summary:        YUI Compressor - JavaScript compressor
10 Summary(pl.UTF-8):      Narzędzie do kompresji kodu JavaScript
11 Name:           yuicompressor
12 Version:        2.4.8
13 Release:        1
14 License:        BSD
15 Group:          Applications/WWW
16 Source0:        https://github.com/yui/yuicompressor/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  a5a0b0d3c99e0a52e24a1da1560560eb
18 Source1:        %{name}.sh
19 URL:            http://yui.github.io/yuicompressor/
20 BuildRequires:  ant
21 BuildRequires:  java-jargs
22 BuildRequires:  jdk >= 1.4
23 BuildRequires:  rpm-javaprov
24 BuildRequires:  rpmbuild(macros) >= 1.300
25 %if %{with tests}
26 BuildRequires:  bash
27 %endif
28 Requires:       jpackage-utils
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 The YUI Compressor is a JavaScript/CSS minifier.
34
35 Its level of compaction is higher than the Dojo compressor, and it is
36 as safe as JSMin.
37
38 Tests on the YUI library have shown savings of about 18% compared to
39 JSMin and 10% compared to the Dojo compressor (these respectively
40 become 10% and 5% after HTTP compression)
41
42 %description -l pl.UTF-8
43 YUI Compressor jest narzędziem do kompresji kodu JavaScript.
44
45 Poziom kompresji osiągany przez YUI Compressor jest większy niż w
46 przypadku Dojo compressor przy czym jest nie mniej bezpieczny niż
47 JSMin.
48
49 Testy wykonane na bibliotece YUI wykazały, że 18% zysk względem JSMin
50 i 10% zysk względem Dojo Compressor (odpowiednio 10% i 5% po kompresji
51 HTTP).
52
53 %prep
54 %setup -q
55
56 rm -rf build
57 # Do not remove lib/rhino-1.6R7.jar It does not work with our java-rhino-1.7
58 rm lib/jargs-1.0.jar
59
60 chmod a+x tests/suite.sh
61
62 %build
63 JARGS_JAR=$(find-jar jargs)
64 ln -sf $JARGS_JAR lib/jargs-1.0.jar
65
66 required_jars='jargs'
67 CLASSPATH=$(build-classpath $required_jars)
68 %ant -Dbuild.sysclasspath=first
69
70 %if %{with tests}
71 ./tests/suite.sh
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT{%{_bindir},%{_javadir}}
77 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
78 cp -p build/yuicompressor-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
79 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %files
85 %defattr(644,root,root,755)
86 %doc LICENSE.TXT doc/*
87 %attr(755,root,root) %{_bindir}/%{name}
88 %{_javadir}/*.jar
This page took 0.090309 seconds and 3 git commands to generate.