%global gem_name actionmailbox %bcond_with tests 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 # Let's keep Requires and BuildRequires sorted alphabeticaly BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 2.2.2 %if %{with tests} BuildRequires: rubygem(railties) = %{version} %endif 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 %build gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %if %{with tests} %check pushd .%{gem_instdir} ln -s %{_builddir}/test . ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd %endif %files %dir %{gem_instdir} %license %{gem_instdir}/MIT-LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %{gem_instdir}/app %{gem_instdir}/db %{gem_instdir}/config %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Wed May 20 2020 Pavel Valena - 1:6.0.3.1-1 - Initial package: ActionMailbox 6.0.3.1.