9143db0
# Generated from listen-0.4.7.gem by gem2rpm -*- rpm-spec -*-
9143db0
%global gem_name listen
9143db0
9143db0
Name: rubygem-%{gem_name}
cfce57d
Version: 3.0.6
cfce57d
Release: 1%{?dist}
Josef Stribny f98791e
Summary: Listen to file modifications
9143db0
Group: Development/Languages
9143db0
License: MIT
9143db0
URL: https://github.com/guard/listen
Josef Stribny f98791e
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
cfce57d
# git clone https://github.com/guard/listen.git && cd listen && git checkout v3.0.6
cfce57d
# tar czvf rubygem-listen-3.0.6-tests.tgz spec
Josef Stribny 7830a61
Source1: rubygem-listen-%{version}-tests.tgz
cfce57d
# Ruby 2.3 tests compatibility
cfce57d
# https://github.com/guard/listen/commit/7b2c935.patch
cfce57d
Patch0: rubygem-listen-3.0.6-fix-test-for-ruby-2.3.patch
72983ba
BuildRequires: ruby(release)
Josef Stribny f98791e
BuildRequires: rubygems-devel
9143db0
BuildRequires: ruby
9143db0
BuildRequires: rubygem(rb-inotify)
Josef Stribny 7830a61
BuildRequires: rubygem(thor)
Josef Stribny 7830a61
BuildRequires: rubygem(rspec) => 3.0.0rc1
9143db0
BuildArch: noarch
9143db0
9143db0
%description
9143db0
The Listen gem listens to file modifications and notifies you about the
9143db0
changes. Works everywhere!
9143db0
9143db0
9143db0
%package doc
9143db0
Summary: Documentation for %{name}
9143db0
Group: Documentation
9143db0
Requires: %{name} = %{version}-%{release}
9143db0
BuildArch: noarch
9143db0
9143db0
%description doc
Josef Stribny f98791e
Documentation for %{name}.
9143db0
9143db0
%prep
9143db0
%setup -q -c -T
72983ba
%gem_install -n %{SOURCE0}
9143db0
cfce57d
# Remove the hardcoded dependencies. We don't have them in Fedora
cfce57d
# (except rb-inotify), they are platform specifis and not needed.
cfce57d
# https://github.com/guard/listen/pull/54
cfce57d
pushd .%{gem_dir}/specifications
cfce57d
sed -i -e '/^.*<rb-fsevent>.*$/ s/^/#/' ./listen-%{version}.gemspec
cfce57d
sed -i -e '/^.*<rb-inotify>.*$/ s/^/#/' ./listen-%{version}.gemspec
9143db0
popd
9143db0
9143db0
%build
9143db0
9143db0
%install
9143db0
mkdir -p %{buildroot}%{gem_dir}
9143db0
cp -a .%{gem_dir}/* \
9143db0
        %{buildroot}%{gem_dir}/
9143db0
Josef Stribny f98791e
Josef Stribny f98791e
mkdir -p %{buildroot}%{_bindir}
Josef Stribny f98791e
cp -pa .%{_bindir}/* \
Josef Stribny f98791e
        %{buildroot}%{_bindir}/
Josef Stribny f98791e
Josef Stribny f98791e
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
Josef Stribny f98791e
Josef Stribny 7830a61
%check
Josef Stribny 7830a61
# Move the tests into place
Josef Stribny 7830a61
tar xzvf %{SOURCE1} -C .%{gem_instdir}
9143db0
Josef Stribny 7830a61
pushd .%{gem_instdir}
Josef Stribny 7830a61
# We removed dependencies from other platforms so let's remove
Josef Stribny 7830a61
# tests as well
Josef Stribny 7830a61
rm spec/lib/listen/adapter/darwin_spec.rb
cfce57d
patch -p1 < %{PATCH0}
Josef Stribny 7830a61
rspec -Ilib:spec -rspec_helper spec
Josef Stribny 7830a61
popd
9143db0
9143db0
%files
9143db0
%dir %{gem_instdir}
Josef Stribny f98791e
%{_bindir}/listen
Josef Stribny f98791e
%{gem_instdir}/bin
cfce57d
%license %{gem_instdir}/LICENSE.txt
9143db0
%{gem_libdir}
9143db0
%exclude %{gem_cache}
9143db0
%{gem_spec}
9143db0
9143db0
%files doc
9143db0
%doc %{gem_docdir}
9143db0
%doc %{gem_instdir}/CHANGELOG.md
9143db0
%doc %{gem_instdir}/README.md
Josef Stribny f98791e
%doc %{gem_instdir}/CONTRIBUTING.md
9143db0
9143db0
%changelog
cfce57d
* Wed Apr 20 2016 Jun Aruga <jaruga@redhat.com> - 3.0.6-1
cfce57d
- Update to 3.0.6.
cfce57d
- Fix test suite for Ruby 2.3 compatibility (rhbz#1308046).
cfce57d
07cbe3d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
07cbe3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
07cbe3d
Josef Stribny 7830a61
* Tue Aug 18 2015 Josef Stribny <jstribny@redhat.com> - 3.0.3-1
Josef Stribny 7830a61
- Update to 3.0.3
Josef Stribny 7830a61
0c046bc
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.11-2
0c046bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0c046bc
Josef Stribny 953033f
* Tue Oct 07 2014 Josef Stribny <jstribny@redhat.com> - 2.7.11-1
Josef Stribny 953033f
- Update to listen 2.7.11
Josef Stribny 953033f
Josef Stribny f98791e
* Mon Sep 01 2014 Josef Stribny <jstribny@redhat.com> - 2.7.9-1
Josef Stribny f98791e
- Update to listen 2.7.9.
Josef Stribny f98791e
8716e34
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-5
8716e34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8716e34
e098497
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-4
e098497
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e098497
72983ba
* Thu Mar 07 2013 Vít Ondruch <vondruch@redhat.com> - 0.4.7-3
72983ba
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
72983ba
5f17bfb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-2
5f17bfb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5f17bfb
9143db0
* Tue Jul 24 2012 Vít Ondruch <vondruch@redhat.com> - 0.4.7-1
9143db0
- Initial package