# Generated from mturk-1.10.1.gem by gem2rpm -*- rpm-spec -*-
%global gem_name mturk

Name: rubygem-%{gem_name}
Version: 1.10.1
Release: 1%{?dist}
Summary: Ruby libraries for working with Mechanical Turk
License: APLv2
URL: https://requester.mturk.com/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(hoe) >= 3.13
# BuildRequires: rubygem(hoe) < 4
BuildArch: noarch

%description
This Amazon Mechanical Turk (MTurk) SDK is no longer under active development
as of 2018-01-01.  The latest MTurk SDKs, with support for most common
programming languages, are now a part of the Amazon Web Service (AWS) SDKs at
https://aws.amazon.com/tools/.  With the AWS SDKs, you can also connect to
MTurk using the AWS Command Line Interface (https://aws.amazon.com/cli/),
allowing you to perform operations from your Windows, Mac, or Linux command
line without having to write code.


%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version}

%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.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}/


mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
        %{buildroot}%{_bindir}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%check
pushd .%{gem_instdir}
# Run the test suite.
popd

%files
%dir %{gem_instdir}
%{_bindir}/mturk
%exclude %{gem_instdir}/.gemtest
%license %{gem_instdir}/LICENSE.txt
%{gem_instdir}/Manifest.txt
%{gem_instdir}/NOTICE.txt
%{gem_instdir}/bin
%{gem_libdir}
%{gem_instdir}/run_rcov.sh
%{gem_instdir}/samples
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/History.md
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/test

%changelog
* Tue Sep 14 2021 mockbuilder - 1.10.1-1
- Initial package