%global commit ae9e090609810a18ecb3345c628494b2f6c43ed9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: js-excanvas Version: 0 Release: 0.2.git%{shortcommit}%{?dist} Summary: Canvas for IE8 and older License: ASL 2.0 URL: https://github.com/arv/ExplorerCanvas Source0: https://github.com/arv/ExplorerCanvas/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: web-assets-devel BuildRequires: closure-compiler # This is only required temporarily in F22 due to a bug in closure-compiler # https://bugzilla.redhat.com/show_bug.cgi?id=1246759 BuildRequires: jarjar Requires: web-assets-filesystem %description Firefox, Safari and Opera 9 support the canvas tag to allow 2D command-based drawing operations. ExplorerCanvas brings the same functionality to Internet Explorer; web developers only need to include a single script tag in their existing canvas webpages to enable this support. %prep %setup -qn ExplorerCanvas-%{commit} %build # build mimified versions for f in `find -name "*.js"`; do bn="${f%.js}" bn="${bn}.min.js" closure-compiler --language_in=ECMASCRIPT5 --js=${f} >${bn} done %install %global inslibdir %{buildroot}%{_jsdir}/excanvas mkdir -p %{inslibdir}/%{version} cp -p excanvas.js excanvas.min.js %{inslibdir}/%{version} %files %license COPYING %doc AUTHORS README examples/ %{_jsdir}/excanvas %changelog * Sat Jul 25 2015 Eduardo Mayorga Téllez - 0-0.2.gitc5a4525 - Building minified version with closure-compiler * Sat Jul 25 2015 Eduardo Mayorga Téllez - 0-0.1.gitc5a4525 - Initial packaging