# Generated from libyajl2-1.0.1.gem by gem2rpm -*- rpm-spec -*- %global gem_name libyajl2 Name: rubygem-%{gem_name} Version: 1.0.1 Release: 1%{?dist} Summary: Installs a vendored copy of libyajl2 for distributions which lack it Group: Development/Languages License: ASL 2.0 URL: https://github.com/opscode/libyajl2-gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Patch0: libyajl2.vendoring.patch Requires: ruby(release) Requires: ruby(rubygems) Requires: yajl BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-devel Provides: rubygem(%{gem_name}) = %{version} # The presence of unused native extensions throws off the autodetection BuildArch: noarch %description Installs a vendored copy of libyajl2 for distributions which lack it. %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 %patch0 -p1 %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}/ # Prevent dangling symlink in -debuginfo (rhbz#878863). rm -rf %{buildroot}%{gem_instdir}/ext/ # Test suite is irrelevant for non-vendored libyajl2, so we don't run it %check %files %dir %{gem_instdir} %exclude %{gem_instdir}/spec %exclude %{gem_instdir}/bootstrap.sh %exclude %{gem_instdir}/Gemfile %exclude %{gem_instdir}/libyajl2.gemspec %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md %doc %{gem_instdir}/CONTRIBUTING.md %doc %{gem_instdir}/LICENSE %doc %{gem_instdir}/Rakefile %changelog * Wed Sep 03 2014 Julian C. Dunn () - 1.0.1-1 - Initial package