%global gem_name occi-core # EL7: rspec >= 3 required %if 0%{?rhel} && 0%{?rhel} <= 7 %global use_tests 0 %else %global use_tests 1 %endif Name: rubygem-%{gem_name} Version: 5.0.0 Release: 1%{?dist} Summary: rOCCI toolkit Group: Development/Languages License: ASL 2.0 URL: https://github.com/the-rocci-project/rOCCI-core Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # v=5.0.0 # git clone https://github.com/the-rocci-project/rOCCI-core && cd rOCCI-core # git checkout v${v} # tar -czf ../rubygem-occi-core-${v}-specs.tgz spec/ Source1: %{name}-%{version}-specs.tgz # for EPEL 7 # (not intended for ustream) Patch0: %{name}-ruby20.patch BuildArch: noarch BuildRequires: ruby(release) BuildRequires: rubygems-devel %if 0%{?use_tests} BuildRequires: rubygem(activesupport) < 6 BuildRequires: rubygem(json) BuildRequires: rubygem(json-schema) < 3 BuildRequires: rubygem(rspec) BuildRequires: rubygem(yell) < 3 %endif %if 0%{?rhel} && 0%{?rhel} <= 7 Requires: ruby(release) Requires: ruby(rubygems) Requires: rubygem(activesupport) < 6 Requires: rubygem(json) < 3 Requires: rubygem(json-schema) < 3 Requires: rubygem(minitest5) Requires: rubygem(yell) < 3 Provides: rubygem(%{gem_name}) = %{version}-%{release} %endif Provides: rOCCI-core = %{version}-%{release} %description The rOCCI toolkit is a collection of classes simplifying implementation of Open Cloud Computing Interface in Ruby. %package doc Summary: Documentation for %{name} Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} tar xzf %{SOURCE1} %if 0%{?rhel} && 0%{?rhel} <= 7 %patch0 -p1 %endif gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # relax dependencies sed -i -e 's|\(%q.*,\) \[.*\]|\1 [">= 1.7.7"]|' %{gem_name}.gemspec %build gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ find %{buildroot}%{gem_dir}/ -type f -name .gitkeep -delete %check %if 0%{?use_tests} cp -pr spec/ ./%{gem_instdir}/ pushd .%{gem_instdir} rspec -Ilib spec rm -rf spec/ popd %endif %files %doc %{gem_instdir}/AUTHORS %license %{gem_instdir}/LICENSE %dir %{gem_instdir}/ %{gem_libdir}/ %exclude %{gem_cache} %exclude %{gem_instdir}/.fasterer.yml %exclude %{gem_instdir}/.gitignore %exclude %{gem_instdir}/.rspec %exclude %{gem_instdir}/.rubocop.yml %exclude %{gem_instdir}/.rubocop_todo.yml %exclude %{gem_instdir}/.travis.yml %exclude %{gem_instdir}/Gemfile %exclude %{gem_instdir}/Rakefile %exclude %{gem_instdir}/%{gem_name}.gemspec %{gem_spec} %files doc %doc %{gem_docdir}/ %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %{gem_instdir}/examples/ %changelog * Mon Aug 28 2017 František Dvořák - 5.0.0-1 - Update to 5.0.0 (#1484600) * Thu Jul 27 2017 Fedora Release Engineering - 4.3.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Wed Jul 19 2017 František Dvořák - 4.3.6-1 - Update to 4.3.6 (#1472516) - Patch with tests update * Tue Feb 21 2017 František Dvořák - 4.3.5-2 - Fix dependencies relaxation for F26+ * Fri Feb 17 2017 František Dvořák - 4.3.5-1 - Update to 4.3.5 (#1417328) - Added rOCCI-core provide * Sat Feb 11 2017 Fedora Release Engineering - 4.3.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Jul 27 2016 František Dvořák - 4.3.2-5 - Relax dependency on rails (for F25 with rails 5) - Updates for EPEL 7 * Sun Jun 19 2016 František Dvořák - 4.3.2-4 - FTBFS with ruby >= 2.3 (#1308057) * Thu Feb 04 2016 Fedora Release Engineering - 4.3.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 4.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Dec 01 2014 František Dvořák - 4.3.2-1 - Update to 4.3.2 - Removed rails >= 4.1 compatibility patch - The license file marked by %%license macro - Removed tests and build files * Thu Sep 4 2014 František Dvořák - 4.2.16-1 - Initial package