4f509d3
# Generated from hocon-0.9.3.gem by gem2rpm -*- rpm-spec -*-
4f509d3
%global gem_name hocon
4f509d3
4f509d3
%if 0%{?el7}
4f509d3
%global enable_checks 0
4f509d3
%else
4f509d3
%global enable_checks 1
4f509d3
%endif
4f509d3
4f509d3
Name: rubygem-%{gem_name}
4f509d3
Version: 0.9.3
9f19c56
Release: 5%{?dist}
4f509d3
Summary: HOCON Config Library
4f509d3
Group: Development/Languages
4f509d3
License: ASL 2.0
4f509d3
URL: https://github.com/puppetlabs/ruby-hocon
4f509d3
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
4f509d3
4f509d3
# https://github.com/puppetlabs/ruby-hocon/issues/65
4f509d3
# SOURCE1 contains the upstream project from github
4f509d3
# in particular this includes the spec directory which was not
4f509d3
# included in the gemfile.
4f509d3
# The following hash corresponds to 0.9.3 tag.
4f509d3
%global commit0 7defef5927bc79dd6d25e3dd2ac42b9e9876c67f
4f509d3
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
4f509d3
Source1: https://github.com/puppetlabs/ruby-hocon/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
4f509d3
4f509d3
BuildRequires: ruby(release)
4f509d3
BuildRequires: rubygems-devel
4f509d3
BuildRequires: ruby >= 1.9.0
4f509d3
%if 0%{?enable_checks}
4f509d3
BuildRequires: rubygem(rspec)
4f509d3
%endif
4f509d3
BuildArch: noarch
4f509d3
%if 0%{?el7}
4f509d3
Provides: rubygem(hocon) = %{version}-%{release}
4f509d3
%endif
4f509d3
4f509d3
%description
4f509d3
A port of the Java Typesafe Config
4f509d3
library to Ruby.
4f509d3
https://github.com/typesafehub/config
4f509d3
4f509d3
%package doc
4f509d3
Summary: Documentation for %{name}
4f509d3
Group: Documentation
4f509d3
Requires: %{name} = %{version}-%{release}
4f509d3
BuildArch: noarch
4f509d3
4f509d3
%description doc
4f509d3
Documentation for %{name}.
4f509d3
4f509d3
%prep
4f509d3
gem unpack %{SOURCE0}
4f509d3
4f509d3
%setup -q -D -T -n  %{gem_name}-%{version}
4f509d3
4f509d3
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
4f509d3
4f509d3
# unpack only the spec files from SOURCE2.
4f509d3
tar zxf %{SOURCE1} ruby-hocon-7defef5927bc79dd6d25e3dd2ac42b9e9876c67f/spec --strip-components 1
4f509d3
4f509d3
%build
4f509d3
# Create the gem as gem install only works on a gem file
4f509d3
gem build %{gem_name}.gemspec
4f509d3
4f509d3
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
4f509d3
# by default, so that we can move it into the buildroot in %%install
4f509d3
%gem_install
4f509d3
4f509d3
%install
4f509d3
mkdir -p %{buildroot}%{gem_dir}
4f509d3
cp -a .%{gem_dir}/* \
4f509d3
        %{buildroot}%{gem_dir}/
4f509d3
4f509d3
%check
4f509d3
%if 0%{?enable_checks}
4f509d3
rspec spec/
4f509d3
%endif
4f509d3
4f509d3
%files
4f509d3
%dir %{gem_instdir}
4f509d3
%license %{gem_instdir}/LICENSE
4f509d3
%{gem_libdir}
4f509d3
%exclude %{gem_cache}
4f509d3
%{gem_spec}
4f509d3
4f509d3
%files doc
4f509d3
%doc %{gem_docdir}
4f509d3
%doc %{gem_instdir}/CHANGELOG.md
4f509d3
%doc %{gem_instdir}/README.md
4f509d3
4f509d3
%changelog
9f19c56
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-5
9f19c56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9f19c56
87ed8aa
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-4
87ed8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
87ed8aa
4f509d3
* Mon Dec 14 2015 Steve Traylen <steve.traylen@cern.ch> - 0.9.3-3
4f509d3
- Remove references to fc21.
4f509d3
4f509d3
* Thu Dec 03 2015 Steve Traylen <steve.traylen@cern.ch> - 0.9.3-2
4f509d3
- Use spec tests from upstream source.
4f509d3
4f509d3
* Tue Nov 03 2015 Steve Traylen <steve.traylen@cern.ch> - 0.9.3-1
4f509d3
- Initial package