Blame SPECS/rubygem-binding_of_caller.spec

d4ca03
%{?scl:%scl_package rubygem-%{gem_name}}
d4ca03
%{!?scl:%global pkg_name %{name}}
d4ca03
d4ca03
# Generated from binding_of_caller-0.7.2.gem by gem2rpm -*- rpm-spec -*-
d4ca03
%global gem_name binding_of_caller
d4ca03
d4ca03
Name: %{?scl_prefix}rubygem-%{gem_name}
d4ca03
Version: 0.7.2
d4ca03
Release: 5%{?dist}
d4ca03
Summary: Retrieve the binding of a method's caller
d4ca03
Group: Development/Languages
d4ca03
License: MIT
d4ca03
URL: http://github.com/banister/binding_of_caller
d4ca03
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
d4ca03
d4ca03
Requires:      %{?scl_prefix_ruby}ruby(release)
d4ca03
Requires:      %{?scl_prefix_ruby}ruby(rubygems)
d4ca03
Requires:      %{?scl_prefix}rubygem(debug_inspector) >= 0.0.1
d4ca03
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
d4ca03
BuildRequires: %{?scl_prefix_ruby}ruby-devel
d4ca03
BuildRequires: %{?scl_prefix}rubygem(bacon)
d4ca03
BuildRequires: %{?scl_prefix}rubygem(debug_inspector)
d4ca03
BuildArch:     noarch
d4ca03
Provides:      %{?scl_prefix}rubygem(%{gem_name}) = %{version}
d4ca03
d4ca03
%description
d4ca03
Retrieve the binding of a method's caller. Can also retrieve bindings even
d4ca03
further up the stack.
d4ca03
d4ca03
%package doc
d4ca03
Summary: Documentation for %{pkg_name}
d4ca03
Group: Documentation
d4ca03
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
d4ca03
BuildArch: noarch
d4ca03
d4ca03
%description doc
d4ca03
Documentation for %{pkg_name}.
d4ca03
d4ca03
%prep
d4ca03
%{?scl:scl enable %{scl} - << \EOF}
d4ca03
gem unpack %{SOURCE0}
d4ca03
%{?scl:EOF}
d4ca03
d4ca03
%setup -q -D -T -n  %{gem_name}-%{version}
d4ca03
d4ca03
%{?scl:scl enable %{scl} - << \EOF}
d4ca03
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
d4ca03
%{?scl:EOF}
d4ca03
d4ca03
# The extension is not needed for Ruby 2.0.0+, so drop it entirely.
d4ca03
sed -i '/s\.extensions/ d' %{gem_name}.gemspec
d4ca03
sed -i 's|, "ext/[^"]*"||g' %{gem_name}.gemspec
d4ca03
d4ca03
%build
d4ca03
# Create the gem as gem install only works on a gem file
d4ca03
%{?scl:scl enable %{scl} - << \EOF}
d4ca03
gem build %{gem_name}.gemspec
d4ca03
%{?scl:EOF}
d4ca03
d4ca03
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
d4ca03
# by default, so that we can move it into the buildroot in %%install
d4ca03
%{?scl:scl enable %{scl} - << \EOF}
d4ca03
%gem_install
d4ca03
%{?scl:EOF}
d4ca03
d4ca03
%install
d4ca03
mkdir -p %{buildroot}%{gem_dir}
d4ca03
cp -a .%{gem_dir}/* \
d4ca03
        %{buildroot}%{gem_dir}/
d4ca03
d4ca03
# Fix executable bits.
d4ca03
# https://github.com/banister/binding_of_caller/commit/9337eb11f71e45b156b2a7567aca05cbc93acf80
d4ca03
find %{buildroot}%{gem_instdir} -type f -perm /a+x | xargs chmod a-x
d4ca03
d4ca03
# Run the test suite
d4ca03
d4ca03
%check
d4ca03
pushd .%{gem_instdir}
d4ca03
%{?scl:scl enable %{scl} - << \EOF}
d4ca03
bacon -a
d4ca03
%{?scl:EOF}
d4ca03
popd
d4ca03
d4ca03
%files
d4ca03
%license %{gem_instdir}/LICENSE
d4ca03
%doc %{gem_instdir}/README.md
d4ca03
%dir %{gem_instdir}
d4ca03
%exclude %{gem_instdir}/.*
d4ca03
%{gem_libdir}
d4ca03
%exclude %{gem_cache}
d4ca03
%{gem_spec}
d4ca03
d4ca03
%files doc
d4ca03
%doc %{gem_docdir}
d4ca03
%{gem_instdir}/Gemfile
d4ca03
%doc %{gem_instdir}/HISTORY
d4ca03
%{gem_instdir}/Rakefile
d4ca03
# This is not the upstream .gemspec anyway.
d4ca03
%exclude %{gem_instdir}/binding_of_caller.gemspec
d4ca03
%{gem_instdir}/examples
d4ca03
%{gem_instdir}/test
d4ca03
d4ca03
%changelog
d4ca03
* Wed Apr 06 2016 Pavel Valena <pvalena@redhat.com> - 0.7.2-5
d4ca03
- Add scl macros
d4ca03
d4ca03
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-4
d4ca03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d4ca03
d4ca03
* Thu Jan 07 2016 Vít Ondruch <vondruch@redhat.com> - 0.7.2-3
d4ca03
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3
d4ca03
d4ca03
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-2
d4ca03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d4ca03
d4ca03
* Mon Jan 26 2015 Vít Ondruch <vondruch@redhat.com> - 0.7.2-1
d4ca03
- Initial package