%global shortname yuicompressor %global shortver 2.4 Name: %{shortname}-appjet Version: %{shortver}.2 Release: 1%{?dist} Summary: JavaScript minifier License: BSD and (MPLv1.1 or GPLv2) # Based on the modified version of yuicompressor found in the etherpad source URL: http://github.com/ether/pad Group: Development/Libraries Source0: http://yuilibrary.com/downloads/yuicompressor/yuicompressor-%{version}.zip Patch0: yuicompressor-2.4.2-system-libs.patch Patch1: yuicompressor-2.4.2-rhino17.patch # Changes made to yuicompressor by appjet for etherpad Patch2: yuicompressor-2.4.2-appjet.patch BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: ant BuildRequires: jargs BuildRequires: rhino BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: jpackage-utils Requires: java Requires: rhino Requires: jargs %description The YUI Compressor is a JavaScript minifier designed to be 100% safe and yield a higher compression ratio than most other tools. Tests on the YUI Library have shown savings of over 20% compared to JSMin (becoming 10% after HTTP compression). Starting with version 2.0, the YUI Compressor is also able to compress CSS files by using a port of Isaac Schlueter's regular-expression-based CSS minifier. %prep %setup -q -n %{shortname}-%{version} %patch0 -p1 -b .system %patch1 -p1 -b .17 %patch2 -p1 -b .appjet # remove all binary bits find -name '*.class' -exec rm -f '{}' \; find -name '*.jar' -exec rm -f '{}' \; %build ant -Dbuild.sysclasspath=first %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_javadir} cp -p build/%{shortname}-%{version}.jar %{buildroot}%{_javadir}/%{shortname}-%{version}-appjet.jar pushd %{buildroot}%{_javadir} ln -s %{shortname}-%{version}-appjet.jar %{shortname}-%{shortver}-appjet.jar ln -s %{shortname}-%{version}-appjet.jar %{name}.jar popd %clean rm -rf %{buildroot} %files %doc doc/CHANGELOG doc/README %defattr(-,root,root,-) %{_javadir}/%{shortname}*.jar %changelog * Sat Oct 9 2010 Tom "spot" Callaway 2.4.2-1 - initial package