diff options
Diffstat (limited to 'rubygem-gemnasium-parser.spec')
-rw-r--r-- | rubygem-gemnasium-parser.spec | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/rubygem-gemnasium-parser.spec b/rubygem-gemnasium-parser.spec new file mode 100644 index 0000000..824dd95 --- /dev/null +++ b/rubygem-gemnasium-parser.spec @@ -0,0 +1,83 @@ +%global gem_name gemnasium-parser + +Name: rubygem-%{gem_name} +Version: 0.1.9 +Release: 1%{?dist} +Summary: Safely parse Gemfiles and gemspecs +Group: Development/Languages +License: MIT +URL: https://github.com/laserlemon/gemnasium-parser +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Requires: ruby(release) +Requires: ruby(rubygems) +Requires: rubygem(bundler) +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby +# Test suite currently fails, but these are the BRs to run it: +#BuildRequires: rubygem(rspec) +#BuildRequires: rubygem(bundler) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +Safely parse Gemfiles and gemspecs + + +%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 + +%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 -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +# Test suite has many failures. Upstream is going through a major refactor on +# for rspec tests. See https://github.com/gemnasium/gemnasium-parser/pull/29 +# For now we will comment out the test suite. +#pushd .%%{gem_instdir} +#rspec -Ilib spec +#popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/LICENSE +%exclude %{gem_instdir}/.* +%{gem_libdir} +%exclude %{gem_cache} +%exclude %{gem_instdir}/%{gem_name}.gemspec +%exclude %{gem_instdir}/Gemfile +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/README.md +%{gem_instdir}/Rakefile +%{gem_instdir}/spec + +%changelog +* Mon Aug 05 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.1.9-1 +- Initial package |