|
|
5b110f |
%{?scl:%scl_package rubygem-%{gem_name}}
|
|
|
5b110f |
%{!?scl:%global pkg_name %{name}}
|
|
|
5b110f |
|
|
|
5b110f |
# Generated from uglifier-1.2.6.gem by gem2rpm -*- rpm-spec -*-
|
|
|
5b110f |
%global gem_name uglifier
|
|
|
5b110f |
|
|
|
5b110f |
# Fallback to rh-nodejs4 rh-nodejs4-scldevel is probably not available in
|
|
|
5b110f |
# the buildroot.
|
|
|
5b110f |
%{?scl:%{!?scl_nodejs:%global scl_nodejs rh-nodejs4}}
|
|
|
5b110f |
%{?scl:%{!?scl_prefix_nodejs:%global scl_prefix_nodejs %{scl_nodejs}-}}
|
|
|
5b110f |
|
|
|
5b110f |
Summary: Ruby wrapper for UglifyJS JavaScript compressor
|
|
|
5b110f |
Name: %{?scl_prefix}rubygem-%{gem_name}
|
|
|
5b110f |
Version: 3.0.2
|
|
|
5b110f |
Release: 1%{?dist}
|
|
|
5b110f |
Group: Development/Languages
|
|
|
5b110f |
# lib/source-map.js is BSD.
|
|
|
5b110f |
# lib/uglify.js is BSD.
|
|
|
5b110f |
License: MIT and BSD
|
|
|
5b110f |
URL: http://github.com/lautis/uglifier
|
|
|
5b110f |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
5b110f |
# Unbundling es5.js and split.js files,
|
|
|
5b110f |
# since they are needed only by JScript engine, which is not supported on Fedora
|
|
|
5b110f |
# https://github.com/lautis/uglifier/issues/99
|
|
|
5b110f |
Patch1: rubygem-uglifier-3.0.0-unbundle-js-files-for-jscript.patch
|
|
|
5b110f |
|
|
|
5b110f |
Requires: %{?scl_prefix_ruby}ruby(release)
|
|
|
5b110f |
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
|
5b110f |
Requires: %{?scl_prefix}rubygem(execjs) >= 0.3.0
|
|
|
5b110f |
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
|
|
5b110f |
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
|
|
5b110f |
BuildRequires: %{?scl_prefix_ruby}ruby
|
|
|
5b110f |
BuildRequires: %{?scl_prefix}rubygem(execjs) >= 0.3.0
|
|
|
5b110f |
BuildRequires: %{?scl_prefix}rubygem(rspec)
|
|
|
5b110f |
# Do not regenerate uglify.js because it's not shiped as a package on SCL.
|
|
|
5b110f |
#BuildRequires: uglify-js = 2.7.0
|
|
|
5b110f |
# uglify-js does not provide single file uglify-js.js yet => let's
|
|
|
5b110f |
# generate and bundle it here.
|
|
|
5b110f |
Provides: bundled(uglify-js) = 2.7.0
|
|
|
5b110f |
# There is not included dist/source-map.js yet.
|
|
|
5b110f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1358915
|
|
|
5b110f |
Provides: bundled(nodejs-source-map) = 0.5.3
|
|
|
5b110f |
|
|
|
5b110f |
BuildArch: noarch
|
|
|
5b110f |
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
|
|
5b110f |
|
|
|
5b110f |
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
|
|
|
5b110f |
%{?scl:Requires: %{?scl_prefix}runtime}
|
|
|
5b110f |
|
|
|
5b110f |
BuildRequires: %{?scl_prefix_nodejs}nodejs
|
|
|
5b110f |
|
|
|
5b110f |
%description
|
|
|
5b110f |
Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in
|
|
|
5b110f |
Ruby.
|
|
|
5b110f |
|
|
|
5b110f |
%package doc
|
|
|
5b110f |
Summary: Documentation for %{pkg_name}
|
|
|
5b110f |
Group: Documentation
|
|
|
5b110f |
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
|
|
5b110f |
BuildArch: noarch
|
|
|
5b110f |
|
|
|
5b110f |
%description doc
|
|
|
5b110f |
Documentation for %{pkg_name}.
|
|
|
5b110f |
|
|
|
5b110f |
%prep
|
|
|
5b110f |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
5b110f |
set -e
|
|
|
5b110f |
gem unpack %{SOURCE0}
|
|
|
5b110f |
|
|
|
5b110f |
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
5b110f |
|
|
|
5b110f |
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
5b110f |
|
|
|
5b110f |
%patch1 -p1
|
|
|
5b110f |
sed -i -E '/files/ s|"lib/es5.js"(.freeze)?, ||' %{gem_name}.gemspec
|
|
|
5b110f |
sed -i -E '/files/ s|"lib/split.js"(.freeze)?, ||' %{gem_name}.gemspec
|
|
|
5b110f |
%{?scl:EOF}
|
|
|
5b110f |
|
|
|
5b110f |
%build
|
|
|
5b110f |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
5b110f |
set -e
|
|
|
5b110f |
gem build %{gem_name}.gemspec
|
|
|
5b110f |
%gem_install
|
|
|
5b110f |
%{?scl:EOF}
|
|
|
5b110f |
|
|
|
5b110f |
%install
|
|
|
5b110f |
mkdir -p %{buildroot}%{gem_dir}
|
|
|
5b110f |
cp -a .%{gem_dir}/* \
|
|
|
5b110f |
%{buildroot}%{gem_dir}/
|
|
|
5b110f |
|
|
|
5b110f |
%check
|
|
|
5b110f |
pushd .%{gem_instdir}
|
|
|
5b110f |
# Disable rubygem-sourcemap because it is not part of fedora yet.
|
|
|
5b110f |
sed -i "/require 'sourcemap'/ s/^/#/" spec/spec_helper.rb
|
|
|
5b110f |
sed -i '/SourceMap::Map/ i \ pending' spec/source_map_spec.rb
|
|
|
5b110f |
|
|
|
5b110f |
%{?scl:scl enable %{scl} %{scl_nodejs} - << \EOF}
|
|
|
5b110f |
rspec spec
|
|
|
5b110f |
%{?scl:EOF}
|
|
|
5b110f |
popd
|
|
|
5b110f |
|
|
|
5b110f |
%files
|
|
|
5b110f |
# There is no %%license macro on RHEL6.
|
|
|
5b110f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1386246
|
|
|
5b110f |
%{!?_licensedir:%global license %%doc}
|
|
|
5b110f |
|
|
|
5b110f |
%dir %{gem_instdir}
|
|
|
5b110f |
%exclude %{gem_instdir}/.*
|
|
|
5b110f |
%license %{gem_instdir}/LICENSE.txt
|
|
|
5b110f |
%{gem_libdir}
|
|
|
5b110f |
%exclude %{gem_cache}
|
|
|
5b110f |
%{gem_spec}
|
|
|
5b110f |
|
|
|
5b110f |
%files doc
|
|
|
5b110f |
%doc %{gem_docdir}
|
|
|
5b110f |
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
5b110f |
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
5b110f |
%{gem_instdir}/Gemfile
|
|
|
5b110f |
%{gem_instdir}/Rakefile
|
|
|
5b110f |
%doc %{gem_instdir}/README.md
|
|
|
5b110f |
%{gem_instdir}/gemfiles
|
|
|
5b110f |
%{gem_instdir}/spec
|
|
|
5b110f |
%{gem_instdir}/%{gem_name}.gemspec
|
|
|
5b110f |
|
|
|
5b110f |
%changelog
|
|
|
5b110f |
* Mon Dec 05 2016 Jun Aruga <jaruga@redhat.com> - 3.0.2-1
|
|
|
5b110f |
- Update to Uglifier 3.0.2.
|
|
|
5b110f |
|
|
|
5b110f |
* Wed Feb 24 2016 Pavel Valena <pvalena@redhat.com> - 2.4.0-5
|
|
|
5b110f |
- Rebuilt for rh-ror42
|
|
|
5b110f |
|
|
|
5b110f |
* Mon Jan 26 2015 Josef Stribny <jstribny@redhat.com> - 2.4.0-1
|
|
|
5b110f |
- Update to 2.4.0
|
|
|
5b110f |
|
|
|
5b110f |
* Mon Feb 17 2014 Josef Stribny <jstribny@redhat.com> - 2.2.1-4
|
|
|
5b110f |
- Depend on scldevel(v8) virtual provide
|
|
|
5b110f |
|
|
|
5b110f |
* Thu Jan 23 2014 Vít Ondruch <vondruch@redhat.com> - 2.2.1-3
|
|
|
5b110f |
- Fix rubygems dependency.
|
|
|
5b110f |
|
|
|
5b110f |
* Tue Nov 26 2013 Josef Stribny <jstribny@redhat.com> - 2.2.1-2
|
|
|
5b110f |
- Use v8 scl macro
|
|
|
5b110f |
|
|
|
5b110f |
* Mon Oct 21 2013 Josef Stribny <jstribny@redhat.com> - 2.2.1-1
|
|
|
5b110f |
- Update to uglifier 2.2.1
|
|
|
5b110f |
|
|
|
5b110f |
* Wed Jun 12 2013 Josef Stribny <jstribny@redhat.com> - 1.2.6-3
|
|
|
5b110f |
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
|
|
|
5b110f |
|
|
|
5b110f |
* Thu Jul 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.6-2
|
|
|
5b110f |
- Imported from Fedora again.
|
|
|
5b110f |
|
|
|
5b110f |
* Mon Jul 16 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.6-1
|
|
|
5b110f |
- Initial package
|