Peng Wu a9e1384
# Generated from file-tail-1.0.5.gem by gem2rpm -*- rpm-spec -*-
a92fa34
%global gem_name file-tail
Peng Wu a9e1384
2f0f928
Name: rubygem-%{gem_name}
a92fa34
Version: 1.1.0
c5fe3e2
Release: 4%{?dist}
a92fa34
Summary: File::Tail for Ruby
Peng Wu a9e1384
Group: Development/Languages
65a1b22
License: GPLv2
a92fa34
URL: http://github.com/flori/file-tail
a92fa34
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
a92fa34
BuildRequires: ruby(release)
a92fa34
BuildRequires: rubygems-devel
a92fa34
BuildRequires: ruby
65a1b22
BuildRequires: rubygem(test-unit)
Peng Wu a9e1384
BuildArch: noarch
Peng Wu a9e1384
7fb9f59
# Ruby 2.3 tests compatibility
7fb9f59
# https://github.com/flori/file-tail/pull/8.patch
7fb9f59
Patch0: rubygem-file-tail-1.1.0-fix-test-for-ruby-2.3.patch
7fb9f59
Peng Wu a9e1384
%description
a92fa34
Library to tail files in Ruby.
Peng Wu a9e1384
Peng Wu a9e1384
Peng Wu a9e1384
%package doc
Peng Wu a9e1384
Summary: Documentation for %{name}
Peng Wu a9e1384
Group: Documentation
Peng Wu a9e1384
Requires: %{name} = %{version}-%{release}
a92fa34
BuildArch: noarch
Peng Wu a9e1384
Peng Wu a9e1384
%description doc
a92fa34
Documentation for %{name}.
Peng Wu a9e1384
Peng Wu a9e1384
%prep
65a1b22
gem unpack %{SOURCE0}
65a1b22
65a1b22
%setup -q -D -T -n  %{gem_name}-%{version}
65a1b22
65a1b22
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
65a1b22
65a1b22
# Install rtail RubyGems stub.
65a1b22
sed -i '/s\.test_files/a \  s.executables = ["rtail"]' %{gem_name}.gemspec
65a1b22
Peng Wu a9e1384
%build
65a1b22
gem build %{gem_name}.gemspec
65a1b22
65a1b22
%gem_install
Peng Wu a9e1384
Peng Wu a9e1384
%install
2f0f928
mkdir -p %{buildroot}%{gem_dir}
65a1b22
cp -a .%{gem_dir}/* \
65a1b22
        %{buildroot}%{gem_dir}/
65a1b22
65a1b22
mkdir -p %{buildroot}%{_bindir}
65a1b22
cp -pa .%{_bindir}/* \
65a1b22
        %{buildroot}%{_bindir}/
65a1b22
65a1b22
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
Peng Wu a9e1384
Peng Wu a9e1384
# rpmlint issue
65a1b22
find %{buildroot}%{gem_instdir}/tests -type f | \
Peng Wu a9e1384
        xargs sed -i -e '\@^#!/usr.*ruby@d'
Peng Wu a9e1384
Peng Wu a9e1384
%check
65a1b22
pushd .%{gem_instdir}
7fb9f59
patch -p1 < %{PATCH0}
65a1b22
ruby -Ilib -e 'Dir.glob "./tests/**/test_*.rb", &method(:require)'
2f0f928
popd
Peng Wu a9e1384
Peng Wu a9e1384
%files
Peng Wu a9e1384
%{_bindir}/rtail
2f0f928
%dir %{gem_instdir}
65a1b22
%exclude %{gem_instdir}/.*
65a1b22
%exclude %{gem_instdir}/file-tail.gemspec
a92fa34
%license %{gem_instdir}/COPYING
2f0f928
%{gem_instdir}/bin
a92fa34
%{gem_libdir}
65a1b22
%exclude %{gem_cache}
2f0f928
%{gem_spec}
Peng Wu a9e1384
Peng Wu a9e1384
%files doc
65a1b22
%doc %{gem_docdir}
65a1b22
%{gem_instdir}/Gemfile
a92fa34
%doc %{gem_instdir}/README.rdoc
a92fa34
%doc %{gem_instdir}/CHANGES
2f0f928
%{gem_instdir}/Rakefile
a92fa34
%doc %{gem_instdir}/VERSION
a92fa34
%{gem_instdir}/examples
2f0f928
%{gem_instdir}/tests
Peng Wu a9e1384
Peng Wu a9e1384
Peng Wu a9e1384
%changelog
c5fe3e2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
c5fe3e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c5fe3e2
7fb9f59
* Mon Apr 18 2016 Jun Aruga <jaruga@redhat.com> - 1.1.0-3
7fb9f59
- Fix test suite for Ruby 2.3 compatibility. (rhbz#1308028)
7fb9f59
cf0fe8b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
cf0fe8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cf0fe8b
a92fa34
* Fri Nov 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.1.0-1
a92fa34
- Update to file-tails 1.1.0.
a92fa34
05647bd
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.12-2
05647bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
05647bd
65a1b22
* Mon Jun 23 2014 Vít Ondruch <vondruch@redhat.com> - 1.0.12-1
65a1b22
- Update to file-tails 1.0.12.
65a1b22
90b3f41
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-10
90b3f41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
90b3f41
72635e8
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-9
72635e8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
72635e8
Peng Wu 7a4c342
* Wed Mar 20 2013 Peng Wu <pwu@redhat.com> - 1.0.5-8
Peng Wu 7a4c342
- Fixes build
Peng Wu 7a4c342
c7e0ac1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-7
c7e0ac1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c7e0ac1
efe522a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-6
efe522a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
efe522a
2f0f928
* Thu Feb 02 2012 Vít Ondruch <vondruch@redhat.com> - 1.0.5-5
2f0f928
- Rebuilt for Ruby 1.9.3.
2f0f928
e0e095c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
e0e095c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e0e095c
Peng Wu a9e1384
* Thu Apr 21 2011  Peng Wu <pwu@redhat.com> - 1.0.5-3
Peng Wu a9e1384
- Run test suite
Peng Wu a9e1384
Peng Wu a9e1384
* Wed Apr 20 2011  Peng Wu <pwu@redhat.com> - 1.0.5-2
Peng Wu a9e1384
- Fixes the spec
Peng Wu a9e1384
Peng Wu a9e1384
* Wed Apr 20 2011 Peng Wu <pwu@redhat.com> - 1.0.5-1
Peng Wu a9e1384
- Initial package