From ee7d5d956a5577106753d9cd1f8ec02209e60962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 May 2012 16:14:00 +0200 Subject: [PATCH] Initial package. --- .gitignore | 1 + rubygem-method_source.spec | 77 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 79 insertions(+) create mode 100644 rubygem-method_source.spec diff --git a/.gitignore b/.gitignore index e69de29..666a6da 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/method_source-0.7.1.gem diff --git a/rubygem-method_source.spec b/rubygem-method_source.spec new file mode 100644 index 0000000..e4ed33b --- /dev/null +++ b/rubygem-method_source.spec @@ -0,0 +1,77 @@ +# Generated from method_source-0.7.1.gem by gem2rpm -*- rpm-spec -*- +%global gem_name method_source +%global rubyabi 1.9.1 + +Summary: Retrieve the source code for a method +Name: rubygem-%{gem_name} +Version: 0.7.1 +Release: 2%{?dist} +Group: Development/Languages +License: MIT +URL: http://banisterfiend.wordpress.com +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +Requires: ruby(abi) = %{rubyabi} +Requires: ruby(rubygems) +BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: rubygems-devel +BuildRequires: ruby +BuildRequires: rubygem(bacon) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +Retrieve the source code for a method + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +%setup -q -c -T +mkdir -p .%{gem_dir} +gem install --local --install-dir .%{gem_dir} \ + --force %{SOURCE0} + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} +# The '-I.' should not be needed in ideal case. +# https://github.com/banister/method_source/issues/12 +bacon -I. test/test.rb +popd + + +%files +%dir %{gem_instdir} +%exclude %{gem_instdir}/.* +%doc %{gem_instdir}/LICENSE +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%{gem_instdir}/Gemfile +%doc %{gem_instdir}/README.markdown +%{gem_instdir}/Rakefile +%{gem_instdir}/method_source.gemspec +%{gem_instdir}/test + +%changelog +* Wed May 02 2012 Vít Ondruch - 0.7.1-2 +- Mark LICENSE as a %%doc. + +* Wed May 02 2012 Vít Ondruch - 0.7.1-1 +- Initial package diff --git a/sources b/sources index e69de29..25a2237 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +e05106f7b9d73db27e86f340f570027b method_source-0.7.1.gem