44%global ruby_libdir %{_datadir }/%{name }
55%global bigdecimal_version 3.1.1
66%global io_console_version 0.5.6
7- %global psych_version 3.1.0
87%global irb_version 1.2.6
98%global json_version 2.3.0
109%global minitest_version 5.13.0
10+ %global rubygems_molinillo_version 0.5.7
11+ %global openssl_version 2.1.2
1112%global power_assert_version 1.1.7
13+ %global psych_version 3.1.0
1214%global rdoc_version 6.2.1.1
15+ %global rubygems_version 3.1.6
1316%global test_unit_version 3.3.4
1417%global gem_dir %{_libdir }/ruby/gems
1518Summary: Ruby
1619Name: ruby
1720Version: 2.7.4
18- Release: 2 %{?dist }
21+ Release: 3 %{?dist }
1922License: (Ruby OR BSD) AND Public Domain AND MIT AND CC0 AND zlib AND UCD
2023Vendor: Microsoft Corporation
2124Distribution: Mariner
@@ -71,6 +74,36 @@ Provides: rubygem-json = %{version}-%{release}
7174The Ruby package contains the Ruby development environment.
7275This is useful for object-oriented scripting.
7376
77+ %package -n rubygems
78+ Summary: The Ruby standard for packaging ruby libraries
79+ Version: %{rubygems_version }
80+ License: Ruby OR MIT
81+ Requires: ruby(release)
82+ Recommends: rubygem(io-console) >= %{io_console_version }
83+ Recommends: rubygem(rdoc) >= %{rdoc_version }
84+ Provides: gem = %{version }-%{release }
85+ Provides: ruby(rubygems) = %{version }-%{release }
86+ # https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910
87+ Provides: bundled(rubygem-molinillo) = %{rubygems_molinillo_version }
88+ BuildArch: noarch
89+
90+ %description -n rubygems
91+ Ruby Gems is the Ruby standard for publishing and managing third party
92+ libraries.
93+
94+ %package -n rubygems-devel
95+ Summary: Macros and development tools for packaging Ruby Gems
96+ Version: %{rubygems_version }
97+ License: Ruby OR MIT
98+ Requires: ruby(rubygems) >= %{version }-%{release }
99+ # Needed for RDoc documentation format generation.
100+ Requires: rubygem(json) >= %{json_version }
101+ Requires: rubygem(rdoc) >= %{rdoc_version }
102+ BuildArch: noarch
103+
104+ %description -n rubygems-devel
105+ Macros and development tools for packaging Ruby Gems.
106+
74107%package -n rubygem-bigdecimal
75108Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic
76109Version: %{bigdecimal_version }
@@ -110,6 +143,59 @@ framework.
110143minitest/pride shows pride in testing and adds coloring to your test
111144output.
112145
146+ %package -n rubygem-io-console
147+ Summary: IO/Console is a simple console utilizing library
148+ Version: %{io_console_version }
149+ License: BSD-2-Clause OR Ruby
150+ Requires: ruby(release)
151+ Requires: ruby(rubygems) >= %{rubygems_version }
152+ Provides: rubygem(io-console) = %{version }-%{release }
153+
154+ %description -n rubygem-io-console
155+ IO/Console provides very simple and portable access to console. It doesn't
156+ provide higher layer features, such like curses and readline.
157+
158+ %package -n rubygem-json
159+ Summary: This is a JSON implementation as a Ruby extension in C
160+ Version: %{json_version }
161+ # UCD: ext/json/generator/generator.c
162+ License: (Ruby OR GPLv2) AND UCD
163+ Requires: ruby(release)
164+ Requires: ruby(rubygems) >= %{rubygems_version }
165+ Provides: rubygem(json) = %{version }-%{release }
166+
167+ %description -n rubygem-json
168+ This is a implementation of the JSON specification according to RFC 4627.
169+ You can think of it as a low fat alternative to XML, if you want to store
170+ data to disk or transmit it over a network rather than use a verbose
171+ markup language.
172+
173+ %package -n rubygem-openssl
174+ Summary: OpenSSL provides SSL, TLS and general purpose cryptography
175+ Version: %{openssl_version }
176+ License: Ruby OR BSD
177+ Requires: ruby(release)
178+ Requires: ruby(rubygems) >= %{rubygems_version }
179+ Provides: rubygem(openssl) = %{version }-%{release }
180+
181+ %description -n rubygem-openssl
182+ OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the
183+ OpenSSL library.
184+
185+ %package -n rubygem-psych
186+ Summary: A libyaml wrapper for Ruby
187+ Version: %{psych_version }
188+ License: MIT
189+ Requires: ruby(release)
190+ Requires: ruby(rubygems) >= %{rubygems_version }
191+ Provides: rubygem(psych) = %{version }-%{release }
192+
193+ %description -n rubygem-psych
194+ Psych is a YAML parser and emitter. Psych leverages
195+ libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting
196+ capabilities. In addition to wrapping libyaml, Psych also knows how to
197+ serialize and de-serialize most Ruby objects to and from the YAML format.
198+
113199%package -n rubygem-power_assert
114200Summary: Power Assert for Ruby
115201Version: %{power_assert_version }
@@ -223,17 +309,12 @@ ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroo
223309# Install io-console
224310mkdir -p %{buildroot }%{gem_dir }/io-console-%{io_console_version }/lib
225311mkdir -p %{buildroot }%{_libdir }/gems/%{name }/io-console-%{io_console_version }/io
226- mv %{buildroot }%{_libdir }/ruby/io %{buildroot }%{gem_dir }/io-console-%{io_console_version }/lib
227312mv %{buildroot }%{gem_dir }/specifications/default/io-console-%{io_console_version }.gemspec %{buildroot }%{gem_dir }/specifications
228- ln -s %{gem_dir }/io-console-%{io_console_version }/lib/io %{buildroot }%{_libdir }/ruby/io
229313
230314# install psych
231315mkdir -p %{buildroot }%{gem_dir }/psych-%{psych_version }/lib
232316mkdir -p %{buildroot }%{_libdir }/gems/%{name }/psych-%{psych_version }
233- mv %{buildroot }%{_libdir }/ruby/psych* %{buildroot }%{gem_dir }/psych-%{psych_version }/lib
234317mv %{buildroot }%{gem_dir }/specifications/default/psych-%{psych_version }.gemspec %{buildroot }%{gem_dir }/specifications
235- ln -s %{gem_dir }/psych-%{psych_version }/lib/psych %{buildroot }%{_libdir }/ruby/psych
236- ln -s %{gem_dir }/psych-%{psych_version }/lib/psych.rb %{buildroot }%{_libdir }/ruby/psych.rb
237318
238319# Install irb
239320mkdir -p %{buildroot }%{gem_dir }/irb-%{irb_version }/lib
@@ -286,6 +367,32 @@ sudo -u test make test TESTS="-v"
286367%dir %{rubygems_dir }
287368%{rubygems_dir }/rubygems
288369
370+ %files -n rubygems
371+ %{_bindir }/gem
372+ %dir %{rubygems_dir }
373+ %{rubygems_dir }/rubygems
374+
375+ # Explicitly include only RubyGems directory strucure to avoid accidentally
376+ # packaged content.
377+ %dir %{gem_dir }
378+ %dir %{gem_dir }/build_info
379+ %dir %{gem_dir }/cache
380+ %dir %{gem_dir }/doc
381+ %dir %{gem_dir }/extensions
382+ %dir %{gem_dir }/gems
383+ %dir %{gem_dir }/specifications
384+ %dir %{gem_dir }/specifications/default
385+ %dir %{_prefix }/lib*/gems
386+ %dir %{_prefix }/lib*/gems/ruby
387+ %exclude %{gem_dir }/cache/*
388+
389+ %files -n rubygems-devel
390+ %{_rpmconfigdir }/macros.d/macros.rubygems
391+ %{_rpmconfigdir }/fileattrs/rubygems.attr
392+ %{_rpmconfigdir }/rubygems.req
393+ %{_rpmconfigdir }/rubygems.prov
394+ %{_rpmconfigdir }/rubygems.con
395+
289396%files -n rubygem-bigdecimal
290397%{_libdir }/gems/%{name }/bigdecimal-%{bigdecimal_version }
291398%{gem_dir }/gems/bigdecimal-%{bigdecimal_version }
@@ -302,6 +409,24 @@ sudo -u test make test TESTS="-v"
302409%{gem_dir }/gems/minitest-%{minitest_version }/Rakefile
303410%{gem_dir }/gems/minitest-%{minitest_version }/test
304411
412+ %files -n rubygem-io-console
413+ %{_libdir }/gems/%{name }/io-console-%{io_console_version }
414+ %{gem_dir }/gems/io-console-%{io_console_version }
415+ %{gem_dir }/specifications/io-console-%{io_console_version }.gemspec
416+
417+ %files -n rubygem-json
418+ %{_libdir }/gems/%{name }/json-%{json_version }
419+ %{gem_dir }/gems/json-%{json_version }
420+ %{gem_dir }/specifications/json-%{json_version }.gemspec
421+
422+ %files -n rubygem-openssl
423+ %{gem_dir }/gems/openssl-%{openssl_version }
424+
425+ %files -n rubygem-psych
426+ %{_libdir }/gems/%{name }/psych-%{psych_version }
427+ %{gem_dir }/gems/psych-%{psych_version }
428+ %{gem_dir }/specifications/psych-%{psych_version }.gemspec
429+
305430%files -n rubygem-power_assert
306431%dir %{gem_dir }/gems/power_assert-%{power_assert_version }
307432%exclude %{gem_dir }/gems/power_assert-%{power_assert_version }/.*
@@ -334,6 +459,9 @@ sudo -u test make test TESTS="-v"
334459%doc %{gem_dir }/gems/test-unit-%{test_unit_version }/doc
335460
336461%changelog
462+ *
Fri Mar 25 2022 Neha Agarwal <[email protected] > -
2.7.4-3 463+ - Build rubygem, openssl, io-console, json, psych rubygems (taken from Fedora 33, license: MIT)
464+
337465*
Tue Mar 15 2022 Neha Agarwal <[email protected] > -
2.7.4-2 338466- Build bigdecimal, minitest, test-unit, rdoc and power_assert rubygems (taken from Fedora 37, license: MIT)
339467
0 commit comments