Name: yuicompressor Version: 2.4.8 Release: 0.1.sha6e2bc23%{?dist} Summary: Tool that supports the compression of both JavaScript and CSS files Group: Development/Tools License: BSD and MPLv1.1 URL: http://yuilibrary.com/projects/yuicompressor/ # we are using prerelease version that is compatible with our rhino Source0: yuicompressor-%{version}.tar.xz # to recreate tarball from git Source1: make_tarball.sh # There is a pull request upstream at # http://yuilibrary.com/projects/yuicompressor/ticket/2528105 Patch0: 0001-Port-to-Rhino-1.7R3-AST-API.patch Patch1: 0002-Port-to-Rhino-1.7R3-re-add-TokenStream.java-patch-be.patch # We should upstream this Patch2: 0003-Test-suite-fix.patch BuildArch: noarch BuildRequires: ant BuildRequires: rhino >= 1.7R3-2 BuildRequires: jargs BuildRequires: java-javadoc Requires: rhino >= 1.7R3-2 Requires: jargs Requires: java Requires: jpackage-utils %description YUI Compressor is an open source tool that supports the compression of both JavaScript and CSS files. The JavaScript compression removes comments and white-spaces as well as obfuscates local variables using the smallest possible variable name. CSS compression is done using a regular-expression-based CSS minifier. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: jpackage-utils Requires: java-javadoc %description javadoc This package contains the API documentation for %{name}. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 iconv -f cp1252 -t UTF-8 LICENSE.TXT > LICENSE.TXT.conv mv LICENSE.TXT.conv LICENSE.TXT rm -rf build lib/* ln -sf $(build-classpath jargs) lib/jargs-1.0.jar ln -sf $(build-classpath rhino) lib/rhino-1.7R3.jar # we don't need this. Jars will be added in script sed -i 's|.*unjar src.*||' build.xml # this fails in rhino-js tests for some reasons rm tests/preserve-case.css %build %ant build.jar # javadoc generation %javadoc -d javadoc -sourcepath src -subpackages com \ -link %{_javadocdir}/java %install # jars install -Dpm 644 build/%{name}-%{version}pre.jar %{buildroot}%{_javadir}/%{name}.jar # install script to run yuicompressor %jpackage_script com.yahoo.platform.yui.compressor.Bootstrap "" "" yuicompressor:jargs:rhino %{name} true # javadocs mkdir -p %{buildroot}/%{_javadocdir}/%{name} cp -rp javadoc/* %{buildroot}/%{_javadocdir}/%{name} %check cd tests ./suite.sh %files %doc LICENSE.TXT doc/README doc/CHANGELOG %{_javadir}/%{name}.jar %{_bindir}/%{name} %files javadoc %doc LICENSE.TXT %{_javadocdir}/%{name} %changelog * Mon Oct 31 2011 Stanislav Ochotnicky - 2.4.8-0.1.sha6e2bc23 - Correct license utf-8 conversion - Fix up javadoc generation - Use proper versioned rhino BR/R - Add readme and changelog as doc * Tue Oct 11 2011 Stanislav Ochotnicky - 2.4.7-0.1.sha4c54e628 - Initial version of the package