# Generated from uglifier-1.2.6.gem by gem2rpm -*- rpm-spec -*- %global gem_name uglifier Summary: Ruby wrapper for UglifyJS JavaScript compressor Name: rubygem-%{gem_name} Version: 3.0.0 Release: 1%{?dist} Group: Development/Languages # lib/source-map.js is BSD. License: MIT and BSD URL: http://github.com/lautis/uglifier Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # Separate lib/uglify.js and lib/source-map.js # https://github.com/lautis/uglifier/pull/98 Patch0: rubygem-uglifier-3.0.0-separate-source-map.patch # Unbundling es5.js and split.js files, # since they are needed only by JScript engine, which is not supported on Fedora # https://github.com/lautis/uglifier/issues/99 Patch1: rubygem-uglifier-3.0.0-unbundle-js-files-for-jscript.patch # Fix test to use UglifyJs 2.7.0 # https://github.com/lautis/uglifier/commit/f676b66 Patch2: rubygem-uglifier-3.0.0-fix-test-for-uglifyjs-2.7.0.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildRequires: rubygem(execjs) >= 0.3.0 BuildRequires: rubygem(rspec) BuildRequires: %{_bindir}/node BuildRequires: uglify-js = 2.7.0 # There is not included uglify-js.js yet. Provides: bundled(uglify-js) = 2.7.0 # There is not included dist/source-map.js yet. # https://bugzilla.redhat.com/show_bug.cgi?id=1358915 Provides: bundled(nodejs-source-map) = 0.5.3 BuildArch: noarch %description Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name} %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %patch0 -p1 sed -i '/files/ s|"\]|", "lib/source-map.js"\]|' %{gem_name}.gemspec %patch1 -p1 sed -i '/files/ s|"lib/es5.js", ||' %{gem_name}.gemspec sed -i '/files/ s|"lib/split.js", ||' %{gem_name}.gemspec # Explicitly removing the file. rm lib/uglify.js %build # It's nice to regenerate from system uglify.js # See "Use of pregenerated code" Guidelines. uglifyjs --self --comments /Copyright/ > lib/uglify.js # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} patch -p1 < %{PATCH2} # Disable rubygem-sourcemap because it is not part of fedora yet. sed -i "s/require 'sourcemap'//" spec/spec_helper.rb sed -i '/SourceMap::Map/ i \ pending' spec/source_map_spec.rb rspec spec popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE.txt %{gem_libdir} %exclude %{gem_instdir}/.* %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/CONTRIBUTING.md %{gem_instdir}/Gemfile %{gem_instdir}/Rakefile %doc %{gem_instdir}/README.md %{gem_instdir}/gemfiles %{gem_instdir}/spec %{gem_instdir}/%{gem_name}.gemspec %changelog * Wed Jul 27 2016 Jun Aruga - 3.0.0-1 - Fix for FTBFS. (rhbz#1357879) - Update to uglifier 3.0.0 * Thu Feb 04 2016 Fedora Release Engineering - 2.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jun 19 2015 Fedora Release Engineering - 2.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 2.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Mar 07 2014 Josef Stribny - 2.4.0-1 - Update to uglifier 2.4.0 * Wed Oct 30 2013 Josef Stribny - 2.3.0-1 - Update to uglifier 2.3.0 * Mon Oct 21 2013 Josef Stribny - 2.2.1-1 - Update to uglifier 2.2.1 * Sun Aug 04 2013 Fedora Release Engineering - 1.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Mar 07 2013 Vít Ondruch - 1.3.0-3 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Thu Feb 14 2013 Fedora Release Engineering - 1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Nov 5 2012 Josef Stribny - 1.3.0-1 - Update to 1.3.0 * Mon Jul 16 2012 Bohuslav Kabrda - 1.2.6-1 - Initial package