summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2015-01-26 18:00:37 +0100
committerVít Ondruch <vondruch@redhat.com>2015-01-26 18:00:37 +0100
commitb84c63401aa6c68c70b30babbc17a56a650f25fc (patch)
tree99b0e3c97c335452b067395e8517f38839a9fa69
parent6de67a3d788673f5a33bf427e551c2bbbd7f96d7 (diff)
downloadrubygem-binding_of_caller-b84c63401aa6c68c70b30babbc17a56a650f25fc.tar.gz
rubygem-binding_of_caller-b84c63401aa6c68c70b30babbc17a56a650f25fc.tar.xz
rubygem-binding_of_caller-b84c63401aa6c68c70b30babbc17a56a650f25fc.zip
Initial packageHEADmaster
-rw-r--r--rubygem-binding_of_caller.spec88
1 files changed, 88 insertions, 0 deletions
diff --git a/rubygem-binding_of_caller.spec b/rubygem-binding_of_caller.spec
new file mode 100644
index 0000000..b28d7c7
--- /dev/null
+++ b/rubygem-binding_of_caller.spec
@@ -0,0 +1,88 @@
+# Generated from binding_of_caller-0.7.2.gem by gem2rpm -*- rpm-spec -*-
+%global gem_name binding_of_caller
+
+Name: rubygem-%{gem_name}
+Version: 0.7.2
+Release: 1%{?dist}
+Summary: Retrieve the binding of a method's caller
+Group: Development/Languages
+License: MIT
+URL: http://github.com/banister/binding_of_caller
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: ruby-devel
+BuildRequires: rubygem(bacon)
+BuildRequires: rubygem(debug_inspector)
+BuildArch: noarch
+
+%description
+Retrieve the binding of a method's caller. Can also retrieve bindings even
+further up the stack.
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}.
+
+%prep
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+# The extension is not needed for Ruby 2.0.0+, so drop it entirely.
+sed -i '/s\.extensions/ d' %{gem_name}.gemspec
+sed -i 's|, "ext/[^"]*"||g' %{gem_name}.gemspec
+
+%build
+# Create the gem as gem install only works on a gem file
+gem build %{gem_name}.gemspec
+
+# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
+# by default, so that we can move it into the buildroot in %%install
+%gem_install
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+# Fix executable bits.
+# https://github.com/banister/binding_of_caller/commit/9337eb11f71e45b156b2a7567aca05cbc93acf80
+find %{buildroot}%{gem_instdir} -type f -perm /a+x | xargs chmod a-x
+
+# Run the test suite
+%check
+pushd .%{gem_instdir}
+bacon -a
+popd
+
+%files
+%license %{gem_instdir}/LICENSE
+%doc %{gem_instdir}/README.md
+%dir %{gem_instdir}
+%exclude %{gem_instdir}/.*
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%{gem_instdir}/Gemfile
+%doc %{gem_instdir}/HISTORY
+%{gem_instdir}/Rakefile
+# This is not the upstream .gemspec anyway.
+%exclude %{gem_instdir}/binding_of_caller.gemspec
+%{gem_instdir}/examples
+%{gem_instdir}/test
+
+%changelog
+* Mon Jan 26 2015 Vít Ondruch <vondruch@redhat.com> - 0.7.2-1
+- Initial package