# Generated from net-pop-0.1.2.gem by gem2rpm -*- rpm-spec -*- %global gem_name net-pop Name: rubygem-%{gem_name} Version: 0.1.2 Release: 1%{?dist} Summary: Ruby client library for POP3 License: Ruby AND BSD-2-Clause URL: https://github.com/ruby/net-pop Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source1: %{gem_name}-%{version}-test-missing-files.tar.gz # SOURCE1 is created by $ bash %%SOURCE2 %%version Source2: %{gem_name}-create-missing-test-files.sh BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-bundled-gems BuildRequires: ruby BuildRequires: rubygem(test-unit) BuildRequires: rubygem(test-unit-ruby-core) BuildArch: noarch %description Ruby client library for POP3. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -a 1 %build gem build ../%{gem_name}-%{version}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ rm -f %{buildroot}%{gem_cache} pushd %{buildroot}%{gem_instdir} rm -rf \ .github/ \ .gitignore \ Gemfile \ Rakefile \ %{gem_name}.gemspec \ %{nil} popd # Avoid conflict with net-pop coming from ruby-bundled-gems # before ruby4.1 for now: # With upcoming ruby4.1 net/pop will be removed from bundled gems: # after that the following is no longer needed. if [ -f %{gem_spec} ] ; then cp -p %{gem_spec} %{buildroot}%{gem_spec} fi %check cp -a %{gem_name}-%{version}/test/ .%{gem_instdir} pushd .%{gem_instdir} # Ref https://github.com/ruby/net-pop/pull/21 # Use system-wide test-unit-ruby-core sed -i test/lib/helper.rb -e 's|require_relative|require|' env RUBYLIB=$(pwd)/lib:$(pwd)/test/lib \ ruby -e \ 'require "helper"; Dir.glob("./test/**/test_*.rb"){|f| require f}' popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE.txt %{gem_libdir} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md %changelog * Tue Nov 10 2026 Mamoru TASAKA - 0.1.2-1 - Initial package