%global gem_name actionmailbox Name: rubygem-%{gem_name} Epoch: 1 Version: 6.0.3.1 Release: 1%{?dist} Summary: Email composition and delivery framework (part of Rails) License: MIT URL: https://rubyonrails.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}%{?prerelease}.gem # Actionmailbox gem doesn't ship with the test suite. # You may check it out like so # git clone http://github.com/rails/rails.git # cd rails/actionmailbox && git archive -v -o actionmailbox-6.0.3.1-tests.txz v6.0.3.1 test Source1: actionmailbox-%{version}%{?prerelease}-tests.txz # The tools are needed for the test suite, are however unpackaged in gem file. # You may get them like so # git clone http://github.com/rails/rails.git --no-checkout # cd rails && git archive -v -o rails-6.0.3.1-tools.txz v6.0.3.1 tools/ Source2: rails-%{version}%{?prerelease}-tools.txz # Let's keep Requires and BuildRequires sorted alphabeticaly BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.2.2 BuildRequires: rubygem(railties) = %{version} BuildRequires: rubygem(rails) = %{version} BuildRequires: rubygem(bundler) BuildRequires: rubygem(sqlite3) BuildRequires: rubygem(byebug) BuildRequires: rubygem(webmock) BuildArch: noarch %description Email on Rails. Compose, deliver, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments. %package doc Summary: Documentation for %{name} Requires:%{name} = %{epoch}:%{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2 %build gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check # fake RAILS_FRAMEWORK_ROOT ln -s %{gem_dir}/specifications/rails-%{version}%{?prerelease}.gemspec .%{gem_dir}/gems/rails.gemspec ln -s %{gem_dir}/gems/railties-%{version}%{?prerelease}/ .%{gem_dir}/gems/railties #ln -s %{gem_dir}/gems/activerecord-%{version}%{?prerelease}/ .%{gem_dir}/gems/activerecord #ln -s %{gem_dir}/gems/activejob-%{version}%{?prerelease}/ .%{gem_dir}/gems/activejob #ln -s %{gem_dir}/gems/actionpack-%{version}%{?prerelease}/ .%{gem_dir}/gems/actionpack #ln -s %{gem_dir}/gems/activesupport-%{version}%{?prerelease}/ .%{gem_dir}/gems/activesupport ln -s ${PWD}%{gem_instdir} .%{gem_dir}/gems/%{gem_name} pushd .%{gem_dir}/gems/%{gem_name} ln -s %{_builddir}/tools .. mv %{_builddir}/test . export RUBYOPT="-I${PWD}/../%{gem_name}/lib" export PATH="${PWD}/../%{gem_name}/exe:$PATH" export BUNDLE_GEMFILE=${PWD}/../Gemfile ls `readlink -f "$PWD/../tools"` cat > $BUNDLE_GEMFILE < - 1:6.0.3.1-1 - Initial package: ActionMailbox 6.0.3.1.