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