Blob Blame History Raw
# Generated from coffee-script-2.2.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name coffee-script

Summary: Ruby CoffeeScript Compiler
Name: rubygem-%{gem_name}
Version: 2.2.0
Release: 6%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/josh/ruby-coffee-script
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
# To get the tests:
# git clone https://github.com/josh/ruby-coffee-script && cd ruby-coffee-script
# git checkout v2.2.0 && tar czf coffee-script-tests-2.2.0.tgz test/
Source1: coffee-script-tests-%{version}.tgz
# Proposed upstream https://github.com/josh/ruby-coffee-script/pull/16
# For initial report see https://github.com/josh/ruby-coffee-script/issues/15
#Patch0: coffee-script-fix-newlines-in-tests.patch
# Minitest 5.x compatibility fixes.
# https://github.com/josh/ruby-coffee-script/commit/60900187617ce7dcbb6ccd94fbdfddaa8022bd0a
Patch0: rubygem-coffee-script-2.2.0-Condition-minitest.patch
# https://github.com/josh/ruby-coffee-script/commit/9b34e37d7ecfa750f5185a0e16df1c131732e318
Patch1: rubygem-coffee-script-2.2.0-Fix-assertions.patch
# https://github.com/josh/ruby-coffee-script/commit/eeee9a0cf4c092c034d49be531678fb2f6d1acd8
Patch2: rubygem-coffee-script-2.2.0-Export-generic-CoffeeScript-Error.patch
# https://github.com/josh/ruby-coffee-script/commit/62abd5a9522b50e75f1756d550d4845c49b4a29f
Patch3: rubygem-coffee-script-2.2.0-Test-error-messages-across-versions.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(coffee-script-source)
BuildRequires: rubygem(execjs)
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(therubyracer)
BuildArch: noarch

%description
Ruby CoffeeScript is a bridge to the JS CoffeeScript compiler.


%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}

%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}

%build

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/

%check
pushd .%{gem_instdir}
# unpack and patch the tests
tar xzf %{SOURCE1}
patch -p1 < %{PATCH0}
patch -p1 < %{PATCH1}
patch -p1 < %{PATCH2}
patch -p1 < %{PATCH3}

ruby -Ilib -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
popd

%files
%dir %{gem_instdir}
%doc %{gem_instdir}/LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md

%changelog
* Wed Jun 25 2014 Vít Ondruch <vondruch@redhat.com> - 2.2.0-6
- Fix FTBFS in Rawhide (rhbz#1107086).

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Mar 07 2013 Vít Ondruch <vondruch@redhat.com> - 2.2.0-3
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Jul 17 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.2.0-1
- Initial package