Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
diff --git a/rubygem-actionmailbox.spec b/rubygem-actionmailbox.spec
index 5e8837b..efc8a03 100644
--- a/rubygem-actionmailbox.spec
+++ b/rubygem-actionmailbox.spec
@@ -1,34 +1,16 @@
+# Generated from actionmailbox- by gem2rpm -*- rpm-spec -*-
%global gem_name actionmailbox
Name: rubygem-%{gem_name}
Release: 1%{?dist}
Summary: Inbound email handling framework
License: MIT
-# Actionmailbox gem doesn't ship with the test suite.
-# You may check it out like so
-# git clone
-# cd rails/actionmailbox && git archive -v -o actionmailbox- 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 --no-checkout
-# cd rails && git archive -v -o rails- v6.0.3.1 tools/
-Source2: rails-%{version}%{?prerelease}-tools.txz
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 2.5.0
-BuildRequires: rubygem(actionmailer) = %{version}
-BuildRequires: rubygem(activestorage) = %{version}
-BuildRequires: rubygem(bundler)
-BuildRequires: rubygem(railties) = %{version}
-BuildRequires: rubygem(sprockets-rails)
-BuildRequires: rubygem(sqlite3)
-BuildRequires: rubygem(webmock)
BuildArch: noarch
@@ -44,10 +26,14 @@ BuildArch: noarch
Documentation for %{name}.
-%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2
+%setup -q -n %{gem_name}-%{version}
-gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
+# 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
@@ -55,43 +41,28 @@ mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
-pushd .%{gem_instdir}/
-ln -s %{_builddir}/tools ..
-cp -a %{_builddir}/test .
-export BUNDLE_GEMFILE=${PWD}/../Gemfile
-gem "railties"
-gem "actionmailer"
-gem "activestorage"
-gem "sprockets-rails"
-gem "sqlite3"
-gem "webmock"
-# Remove byebug dependency
-sed -i '/^require..byebug./ s/^/#/' test/test_helper.rb
-ruby -rbundler -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
+pushd .%{gem_instdir}
+# Run the test suite.
%dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE
%exclude %{gem_cache}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/
%doc %{gem_instdir}/
-* Mon Aug 03 07:01:37 GMT 2020 Pavel Valena <> -
-- Initial package: ActionMailbox
+* Tue Aug 11 2020 Pavel Valena <> -
+- Initial package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.