%global gem_name aws-sdk-core Name: rubygem-%{gem_name} Version: 2.0.1 Release: 1%{?dist} Summary: AWS SDK for Ruby - Core Group: Development/Languages License: ASL 2.0 URL: http://github.com/aws/aws-sdk-core-ruby Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/aws/aws-sdk-core-ruby && cd aws-sdk-core-ruby/aws-sdk-core # git checkout v2.0.1 # cp -p ../LICENSE.txt ../README.md . # tar -czf rubygem-aws-sdk-core-2.0.1-repo.tgz spec/ LICENSE.txt README.md Source1: rubygem-aws-sdk-core-%{version}-repo.tgz # https://github.com/aws/aws-sdk-core-ruby/pull/116 Source2: aws.rb.1 Patch0: rubygem-aws-sdk-core-tests.diff BuildArch: noarch BuildRequires: rubygems-devel > 1.3.1 # for tests: #BuildRequires: rubygem(builder) => 3.0 #BuildRequires: rubygem(builder) < 4 #BuildRequires: rubygem(jamespath) >= 0.5.1 #BuildRequires: rubygem(multi_json) => 1.0 #BuildRequires: rubygem(multi_json) < 2 #BuildRequires: rubygem(multi_xml) => 0.5 #BuildRequires: rubygem(multi_xml) < 1 #BuildRequires: rubygem(rspec) >= 3 %if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7 Requires: ruby(release) Requires: ruby(rubygems) > 1.3.1 Requires: rubygem(builder) => 3.0 Requires: rubygem(builder) < 4 Requires: rubygem(jamespath) >= 0.5.1 Requires: rubygem(multi_json) => 1.0 Requires: rubygem(multi_json) < 2 Requires: rubygem(multi_xml) => 0.5 Requires: rubygem(multi_xml) < 1 Provides: rubygem(%{gem_name}) = %{version} %endif %description Provides API clients for AWS. %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} %patch0 -p2 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # remove release part of the version sed -i -e 's/\(s\.version\)\s*=\s*.*/\1 = "%{version}"/' %{gem_name}.gemspec %build gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ cp -a spec/ LICENSE.txt README.md %{buildroot}%{gem_instdir}/ mkdir -p %{buildroot}%{_mandir}/man1 install -p -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/ # Missing dependencies #%%check #pushd .%%{gem_instdir} #rspec -Ilib spec #popd %files %doc %{gem_instdir}/LICENSE.txt %dir %{gem_instdir}/ %{_bindir}/aws.rb %{_mandir}/man1/aws.rb.1* %{gem_instdir}/apis/ %{gem_instdir}/bin/ %{gem_libdir}/ %exclude %{gem_cache} %{gem_spec} %{gem_instdir}/endpoints.json %files doc %doc %{gem_instdir}/README.md %doc %{gem_docdir}/ %{gem_instdir}/spec/ %changelog * Sat Oct 04 2014 František Dvořák - 2.0.1-1 - Initial package