Repository navigation
Expand file tree
/
Copy pathruby.spec
More file actions
1503 lines (1287 loc) · 54.6 KB
/
Copy pathruby.spec
File metadata and controls
1503 lines (1287 loc) · 54.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# TODO:
# - include ext/ in docs
#
# Conditional build:
%bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds
%bcond_without batteries # Don't include rubygems, json, rake, minitest
%bcond_without default_ruby # use this Ruby as default system Ruby
%bcond_without dtrace # disable tracing with dtrace
%bcond_with bootstrap # build bootstrap version
%bcond_with tests # build without tests
%ifarch %{x8664} aarch64
%define with_yjit 1
%define with_zjit 1
%endif
%define rel 1
%define ruby_version 4.0
%define patchlevel 9
%define pkg_version %{ruby_version}.%{patchlevel}
%define ruby_suffix %{!?with_default_ruby:%{ruby_version}}
%define doc_version 3_4_1
%define unicode_version 17.0.0
%define oname ruby
Summary: Ruby - interpreted scripting language
Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ
Summary(pl.UTF-8): Ruby - interpretowany język skryptowy
Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto
Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言
Name: ruby%{ruby_suffix}
Version: %{pkg_version}
Release: %{rel}
Epoch: 1
# Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ...
# MIT and CCO: ccan/*
# zlib: ext/digest/md5/md5.*, nkf/nkf-utf8/nkf.c (bundled gem)
# UCD: some of enc/trans/**/*.src
License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD
Group: Development/Languages
# https://www.ruby-lang.org/en/downloads/
Source0: https://cache.ruby-lang.org/pub/ruby/%{ruby_version}/%{oname}-%{pkg_version}.tar.xz
# Source0-md5: bfcbb1f74060e9201e9fd154c85176f3
Source2: https://ruby-doc.org/downloads/%{oname}_%{doc_version}_complete_rdocs.tgz
# Source2-md5: a13c63951d5ce47b169935a7208f876d
Source6: operating_system.rb
Patch4: strip-ccache.patch
Patch5: ruby-version.patch
Patch6: duplicated-paths.patch
Patch9: custom-rubygems-location.patch
Patch12: archlibdir.patch
Patch13: CVE-2026-33210.patch
Patch14: CVE-2026-54696.patch
URL: http://www.ruby-lang.org/
BuildRequires: autoconf >= 2.67
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: gmp-devel
BuildRequires: libffi-devel
BuildRequires: libstdc++-devel
BuildRequires: openssl-devel >= 0.9.6
BuildRequires: pkgconfig
BuildRequires: rpm-build >= 5.4.10-49
BuildRequires: rpmbuild(macros) >= 2.050
# which version is minimum now? 1.8.7 is not enough, fails with:
# ./tool/generic_erb.rb:31: syntax error, unexpected ':', expecting ')'
# ...O.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil)
BuildRequires: ruby >= 1:3.0
%if %{with yjit} || %{with zjit}
BuildRequires: rust >= 1.85
%endif
BuildRequires: sed >= 4.0
%{?with_dtrace:BuildRequires: systemtap-sdt-devel}
BuildRequires: tar >= 1:1.22
BuildRequires: xz
BuildRequires: yaml-devel
BuildRequires: zlib-devel
%if %{without bootstrap}
# bootstrap needs ruby binary, erb module
BuildRequires: rpm-rubyprov
BuildRequires: ruby-modules
%endif
Requires(post,postun): /sbin/ldconfig
%if %{with yjit} || %{with zjit}
%{?rust_req}
%endif
Obsoletes: ruby-REXML <= 2.4.0-2
Obsoletes: ruby-doc < 1.8.4
Obsoletes: ruby-fastthread <= 0.6.3
Conflicts: rpm-build-macros < 1.695
Conflicts: ruby-activesupport < 2.3.11-2
Conflicts: ruby-activesupport2 < 2.3.11-2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# hack: skip rubygem(ipaddr)
%define _noautoreq ipaddr
%define rubygems_ver 4.0.20
%define rubygems_molinillo_ver 0.8.0
%define rubygems_optparse_ver 0.6.0
%define rubygems_tsort_ver 0.2.0
# Default gems.
%define bundler_ver 4.0.20
%define bundler_connection_pool_ver 2.5.4
%define bundler_fileutils_ver 1.8.0
%define bundler_pub_grub_ver 0.5.0
%define bundler_net_http_persistent_ver 4.0.6
%define bundler_thor_ver 1.4.0
%define bundler_tsort_ver 0.2.0
%define bundler_uri_ver 1.1.1
%define did_you_mean_ver 2.0.0
%define erb_ver 6.0.7
%define io_console_ver 0.8.2
%define irb_ver 1.16.0
%define json_ver 2.18.0
%define openssl_ver 4.0.2
%define psych_ver 5.3.1
%define rdoc_ver 7.0.4
%define stringio_ver 3.2.0
# Bundled gems.
%define bigdecimal_ver 4.0.1
%define minitest_ver 6.0.0
%define power_assert_ver 3.0.1
%define rake_ver 13.3.1
%define test_unit_ver 3.7.5
%define rexml_ver 3.4.4
%define rss_ver 0.3.2
%define net_ftp_ver 0.3.9
%define net_imap_ver 0.6.4.1
%define net_pop_ver 0.1.2
%define net_smtp_ver 0.5.1
%define matrix_ver 0.4.3
%define prime_ver 0.1.4
%define rbs_ver 3.10.0
%define typeprof_ver 0.31.1
%define debug_ver 1.11.1
%define racc_ver 1.8.1
%define nkf_ver 0.2.0
%define syslog_ver 0.3.0
%define csv_ver 3.3.5
%define abbrev_ver 0.1.2
%define base64_ver 0.3.0
%define drb_ver 2.2.3
%define mutex_m_ver 0.3.0
%define getoptlong_ver 0.2.1
%define observer_ver 0.1.2
%define resolv_replace_ver 0.1.1
%define rinda_ver 0.2.0
%define repl_type_completor_ver 0.1.12
%define benchmark_ver 0.5.0
%define fiddle_ver 1.1.8
%define logger_ver 1.7.0
%define ostruct_ver 0.6.3
%define pstore_ver 0.2.1
%define readline_ver 0.0.4
%define reline_ver 0.6.3
%define ruby_ridir %{_datadir}/ri/system
%define gem_dir %{_datadir}/gems
%define gem_libdir %{_libdir}/gems/%{oname}
# location where rubygems is installed
%define rubygems_dir %{ruby_libdir}
%define ruby_archdir %{_libdir}/%{oname}/%{ruby_version}
%define ruby_libarchdir %{_libdir}/%{oname}/%{ruby_version}
%define ruby_libdir %{_datadir}/%{oname}/%{ruby_version}
# This is the local lib/arch and should not be used for packaging.
%define sitedir site_ruby
%define ruby_sitearchdir %{_prefix}/local/%{_lib}/%{oname}/%{sitedir}/%{ruby_version}
%define ruby_sitelibdir %{_prefix}/local/share/%{oname}/%{sitedir}
# This is the general location for libs/archs compatible with all
# or most of the Ruby versions available in the PLD repositories.
%define vendordir vendor_ruby
%define ruby_vendorarchdir %{_libdir}/%{oname}/%{vendordir}/%{ruby_version}
%define ruby_vendorlibdir %{_datadir}/%{oname}/%{vendordir}
# bleh, some nasty (gcc or ruby) bug still not fixed
# (SEGV or "unexpected break" on miniruby run during build)
%define specflags_ia64 -O0
# ruby needs frame pointers for correct exception handling
%define specflags_ia32 -fno-omit-frame-pointer
# Ruby code violates C strict aliasing rules in many places (Alpine, openSUSE both add this;
# Alpine notes it's needed to avoid miscompilation, openSUSE applies it for iseq.c correctness)
%define specflags -fno-strict-aliasing
%description
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in Perl). It is simple,
straight-forward, extensible, and portable.
This package contains only shared library and ruby interpreter. To get
full-functional ruby environment install ruby-modules package.
%description -l ja.UTF-8
Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初
から純粋なオブジェクト指向言語として設計されていますから,オブジェクト
指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です.
%description -l pl.UTF-8
Ruby to interpretowany język skryptowy, w sam raz dla łatwego i
szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji
ułatwiających przetwarzanie plików tekstowych i wykonywanie prac
związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty,
rozszerzalny i przenośny.
Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby.
Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni
funkcjonalnego środowiska ruby.
%description -l pt_BR.UTF-8
Ruby é uma linguagem de script interpretada de programação orientada a
objeto. Possui diversas características para processamento de texto. É
simples, extensível e direta.
%package modules
Summary: Ruby standard modules and utilities
Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby
Group: Development/Languages
Requires: %{name} = %{epoch}:%{version}-%{release}
Suggests: ruby-rubygems
# ruby-modules deprecated, rpm5 generates ruby(abi) itself
Provides: ruby-modules(ver) = %{ruby_version}
# FIXME later
Provides: ruby(abi) = %{ruby_version}
%requires_ge_to openssl openssl-devel
%description modules
Ruby standard modules and utilities:
- erb - Tiny eRuby
- testrb - automatic runner for Test::Unit of Ruby
%description modules -l pl.UTF-8
Standardowe moduły i narzędzia Ruby:
- erb - mały eRuby
- testrb - automatyczny runner dla Ruby Test::Unit
%package devel
Summary: Ruby development libraries
Summary(pl.UTF-8): Biblioteki programistyczne interpretera języka Ruby
Group: Development/Languages
Requires: %{name}-modules = %{epoch}:%{version}-%{release}
Requires: gcc
Requires: glibc-devel
Requires: gmp-devel
Requires: pkgconfig
Obsoletes: ruby-static < 1:2.4
%description devel
Ruby development libraries.
%description devel -l pl.UTF-8
Biblioteki programistyczne interpretera języka Ruby.
%package doc
Summary: Ruby HTML documentation
Summary(pl.UTF-8): Dokumentacja HTML do Ruby
Group: Documentation
BuildArch: noarch
%description doc
Ruby HTML documentation: FAQ, guide, core and standard library.
%description doc -l pl.UTF-8
Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i
stdlib.
%package doc-ri
Summary: Ruby ri documentation
Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri
Group: Documentation
Requires: %{name}-modules = %{epoch}:%{version}-%{release}
BuildArch: noarch
%description doc-ri
Ruby ri documentation.
%description doc-ri -l pl.UTF-8
Dokumentacja Ruby w formacie ri.
%package examples
Summary: Ruby examples
Summary(pl.UTF-8): Przykłady dla języka Ruby
Group: Development/Languages
BuildArch: noarch
%description examples
Ruby examples.
%description examples -l pl.UTF-8
Przykłady programów w języku Ruby.
# IMPORTANT: keep irb, rdoc, rubygems, rake, json as last packages as we reset epoch/version/release
# and version, release macros may not be used directly as they take last
# subpackage value not main package one what you intend to use
%package irb
Summary: The Interactive Ruby
Summary(pl.UTF-8): Interaktywny Ruby
Version: %{irb_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
Group: Development/Languages
Requires: %{name}-modules = 1:%{pkg_version}-%{rel}
Provides: irb = %{version}-%{release}
Provides: ruby(irb) = %{version}-%{release}
BuildArch: noarch
%description irb
The irb is acronym for Interactive Ruby. It evaluates ruby expression
from the terminal.
%description irb -l pl.UTF-8
Nazwa irb to skrót od Interactive Ruby (interaktywny Ruby). Wyznacza
wartości wyrażeń języka ruby podane z terminala.
%package rdoc
Summary: A tool to generate HTML and command-line documentation for Ruby projects
Summary(pl.UTF-8): Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym
Version: %{rdoc_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
# SIL: lib/rdoc/generator/template/darkfish/css/fonts.css
License: GPLv2 and Ruby and MIT and SIL
Group: Development/Libraries
Requires: %{name}-irb >= %{irb_ver}
Requires: %{name}-json >= %{json_ver}
Requires: %{name}-modules = 1:%{pkg_version}-%{rel}
Obsoletes: rdoc <= 0.9.0
BuildArch: noarch
%description rdoc
RDoc produces HTML and command-line documentation for Ruby projects.
RDoc includes the 'rdoc' and 'ri' tools for generating and displaying
online documentation.
%description rdoc -l pl.UTF-8
RDoc tworzy dokumentację HTML i linii poleceń dla projektów w języku
Ruby. RDoc zawiera narzędzia 'rdoc' i 'ri' do generowania i
wyświetlania dokumentacji online.
%package rubygems
Summary: RubyGems - the Ruby standard for packaging Ruby libraries
Summary(pl.UTF-8): RubyGems - standard Ruby'ego pakietowania bibliotek
Version: %{rubygems_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: Ruby or MIT
Group: Development/Libraries
Requires: %{name}-bigdecimal = %{bigdecimal_ver}-%{pkg_version}.%{rel}
Requires: %{name}-io-console = %{io_console_ver}-%{pkg_version}.%{rel}
Requires: %{name}-modules = 1:%{pkg_version}-%{rel}
Requires: %{name}-psych = %{psych_ver}-%{pkg_version}.%{rel}
Requires: %{name}-rdoc >= %{rdoc_ver}
Suggests: %{name}-devel
Provides: rubygems = %{rubygems_ver}
BuildArch: noarch
%description rubygems
RubyGems is the Ruby standard for publishing and managing third party
libraries.
%description rubygems -l pl.UTF-8
RubyGems to standardowe narzędzie języka Ruby do publikowania i
zarządzania zewnętrznymi bibliotekami.
%package bundler
Summary: Library and utilities to manage a Ruby application's gem dependencies
Summary(pl.UTF-8): Biblioteka i narzędzia do zarządzania zależnościami gem aplikacji w języku Ruby
Version: %{bundler_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: MIT
Group: Development/Languages
Provides: bundler = %{bundler_ver}
BuildArch: noarch
%description bundler
Bundler manages an application's dependencies through its entire life,
across many machines, systematically and repeatably.
%description bundler -l pl.UTF-8
Bundler zarządza zależnościami aplikacji przez cały czas jej życia,
między wiloma maszynami - systematycznie i powtarzalnie.
%package rake
Summary: Rake is a Make-like program implemented in Ruby
Summary(pl.UTF-8): Program typu Make dla języka Ruby
Version: %{rake_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: MIT
Group: Development/Languages
Provides: rake = %{rake_ver}
Conflicts: ruby-modules < 1:1.9.3.429-2
BuildArch: noarch
%description rake
Rake is a simple Ruby build program with capabilities similar to make.
It has the following features:
- Rakefiles (rake's version of Makefiles) are completely defined in
standard Ruby syntax. No XML files to edit. No quirky Makefile syntax
to worry about (is that a tab or a space?)
- Users can specify tasks with prerequisites.
- Rake supports rule patterns to synthesize implicit tasks.
- Rake is lightweight. It can be distributed with other projects as a
single file. Projects that depend upon rake do not require that rake
be installed on target systems.
%description rake -l pl.UTF-8
Rake to prosty program do budowania w języku Ruby o możliwościach
podobnych do make.
Ma następujące cechy:
- Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane
całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować
plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to
tabulacja czy spacja?).
- Użytkownicy mogą określać zadania z ich zależnościami.
- Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań.
- Rake jest lekki. Może być rozpowszechniany z innymi projektami jako
pojedynczy plik. Projekty używające rake'a nie wymagają go
zainstalowanego na systemach docelowych.
%package json
Summary: JSON library for Ruby
Summary(pl.UTF-8): Biblioteka JSON dla języka Ruby
Version: %{json_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
# UCD: ext/json/generator/generator.c
License: (Ruby or GPL v2) and UCD
Group: Development/Languages
Obsoletes: ruby-json-rubyforge < 1
Conflicts: ruby-modules < 1:1.9.3.429-3
%description json
This is a JSON implementation as a Ruby extension in C.
%description json -l pl.UTF-8
Biblioteka JSON dla języka Ruby.
%package minitest
Summary: Minitest - a complete suite of testing facilities
Summary(pl.UTF-8): Minitest - kompletny szkielet do testowania
Version: %{minitest_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: MIT
Group: Development/Libraries
BuildArch: noarch
%description minitest
minitest/unit is a small and incredibly fast unit testing framework.
minitest/spec is a functionally complete spec engine.
minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner.
minitest/mock by Steven Baker, is a beautifully tiny mock object
framework.
minitest/pride shows pride in testing and adds coloring to your test
output.
%description minitest -l pl.UTF-8
minitest/unit to mały i bardzo szybki szkielet testów jednostkowych.
minitest/spec to funkcjonalnie kompletny silnik specyfikacji.
minitest/benchmark to wspaniały sposób zapewnienia wydajności
algorytmów w powtarzalny sposób.
minitest/mock autorstwa Stevena Bakera to mały szkielet obiektów
atrap.
minitest/pride ukazuje dumę z testowania i dodaje kolorowanie do
wyjścia testów.
%package power_assert
Summary: Power Assert for Ruby
Summary(pl.UTF-8): Power Assert dla języka Ruby
Version: %{power_assert_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: Ruby or BSD
Group: Development/Libraries
BuildArch: noarch
%description power_assert
Power Assert shows each value of variables and method calls in the
expression. It is useful for testing, providing which value wasn't
correct when the condition is not satisfied.
%description power_assert -l pl.UTF-8
Power Assert pokazuje każdą wartość zmiennych i wywołań metod w
wyrażeniu. Jest przydatny do testowania, ukazując, która wartość nie
była poprawna, kiedy warunek nie był spełniony.
%package test-unit
Summary: An xUnit family unit testing framework for Ruby
Summary(pl.UTF-8): Szkielet testów z rodziny xUnit dla języka Ruby
Version: %{test_unit_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license.
# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later.
License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPL v2+)
Group: Development/Libraries
Requires: ruby-power_assert = %{power_assert_ver}-%{pkg_version}.%{rel}
BuildArch: noarch
%description test-unit
test-unit (Test::Unit) is unit testing framework for Ruby, based on
xUnit principles. These were originally designed by Kent Beck, creator
of extreme programming software development methodology, for
Smalltalk's SUnit. It allows writing tests, checking results and
automated testing in Ruby.
%description test-unit -l pl.UTF-8
test-unit (Test::Unit) to szkielet testów jednostkowych dla języka
Ruby oparty na zasadach xUnit. Te były pierwotnie zaprojektowane przez
Kenta Becka, twórcy metodyki tworzenia oprogramowania zwanej
programowaniem ekstremalnym, dla szkieletu SUnit dla Smalltalka.
Szkielet pozwala na pisanie testów, sprawdzanie wyników i automatyczne
testowanie w Rubym.
%package rbs
Summary: Type signature for Ruby
Version: %{rbs_ver}
Release: %{pkg_version}.%{rel}
License: MIT
Group: Development/Libraries
%description rbs
RBS is the language for type signatures for Ruby and standard library
definitions.
%package typeprof
Summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation
Version: %{typeprof_ver}
Release: %{pkg_version}.%{rel}
License: MIT
URL: https://github.com/ruby/typeprof
BuildArch: noarch
%description typeprof
TypeProf performs a type analysis of non-annotated Ruby code. It
abstractly executes input Ruby code in a level of types instead of
values, gathers what types are passed to and returned by methods, and
prints the analysis result in RBS format, a standard type description
format for Ruby 3.x
%package bigdecimal
Summary: BigDecimal - arbitrary-precision floating point decimal arithmetic
Summary(pl.UTF-8): BigDecimal - dziesiętna arytmetyka zmiennoprzecinkowa o dowolnej dokładności
Version: %{bigdecimal_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: GPL+ or Artistic
Group: Development/Libraries
%description bigdecimal
Ruby provides built-in support for arbitrary precision integer
arithmetic. For example:
42**13 -> 1265437718438866624512
BigDecimal provides similar support for very large or very accurate
floating point numbers. Decimal arithmetic is also useful for general
calculation, because it provides the correct answers people expect -
whereas normal binary floating point arithmetic often introduces
subtle errors because of the conversion between base 10 and base 2.
%description bigdecimal -l pl.UTF-8
Ruby zapewnia wbudowaną obsługę arytmetyki całkowitej dowolnej
dokładności, np.:
42**13 -> 1265437718438866624512
BigDecimal zapewnia podobną obsługę bardzo dużych lub bardzo
dokładnych liczb zmiennoprzecinkowych. Arytmetyka dziesiętna jest
przydatna także do ogólnych obliczeń, ponieważ zapewnia poprawne
odpowiedzi oczekiwane przez ludzi - podczas gdy normalna binarna
arytmetyka zmiennoprzecinkowa wprowadza minimalne błędy spowodowane
zmianą podstawy między 10 a 2.
%package io-console
Summary: IO/Console - a simple console utilizing library
Summary(pl.UTF-8): IO/Console - prosta biblioteka wykorzystująca konsolę
Version: %{io_console_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
Group: Development/Libraries
%description io-console
IO/Console provides very simple and portable access to console. It
doesn't provide higher layer features, such like curses and readline.
%description io-console -l pl.UTF-8
IO/Console zapewnia bardzo prosty i przenośny dostęp do konsoli. Nie
udostępnia funkcji wyższego poziomu, takich jak curses czy readline.
%package psych
Summary: A libyaml wrapper for Ruby
Summary(pl.UTF-8): Obudowanie libyaml dla języka Ruby
Version: %{psych_ver}
Release: %{pkg_version}.%{rel}
Epoch: 0
License: MIT
Group: Development/Libraries
%description psych
Psych is a YAML parser and emitter. Psych leverages libyaml for its
YAML parsing and emitting capabilities. In addition to wrapping
libyaml, Psych also knows how to serialize and de-serialize most Ruby
objects to and from the YAML format.
%description psych -l pl.UTF-8
Psych to parser i emiter YAML. Wykorzystuje libyaml do analizy i
emitowania YAML-a. Poza obudowaniem libyaml, wie także jak
serializować i deserializować większość obiektów języka Ruby do/z
formatu YAML.
%package rexml
Summary: An XML toolkit for Ruby
Version: %{rexml_ver}
Release: %{pkg_version}.%{rel}
License: BSD
URL: https://github.com/ruby/rexml
BuildArch: noarch
%description rexml
REXML was inspired by the Electric XML library for Java, which
features an easy-to-use API, small size, and speed. Hopefully, REXML,
designed with the same philosophy, has these same features. I've tried
to keep the API as intuitive as possible, and have followed the Ruby
methodology for method naming and code flow, rather than mirroring the
Java API.
REXML supports both tree and stream document parsing. Stream parsing
is faster (about 1.5 times as fast). However, with stream parsing, you
don't get access to features such as XPath.
%package rss
Summary: Family of libraries that support various formats of XML "feeds"
Version: %{rss_ver}
License: BSD
URL: https://github.com/ruby/rss
BuildArch: noarch
%description rss
Really Simple Syndication (RSS) is a family of formats that describe
'feeds', specially constructed XML documents that allow an interested
person to subscribe and receive updates from a particular web service.
This library provides tooling to read and create these feeds.
%package bundled-gems
Summary: Bundled gems which are part of Ruby StdLib
Requires: ruby-rubygems >= %{rubygems_ver}
# Runtime dependency of rubygem(debug).
Recommends: rubygem(irb) >= %{irb_ver}
Provides: rubygem(abbrev) = %{abbrev_ver}
Provides: rubygem(base64) = %{base64_ver}
Provides: rubygem(benchmark) = %{benchmark_ver}
Provides: rubygem(csv) = %{csv_ver}
Provides: rubygem(debug) = %{debug_ver}
Provides: rubygem(drb) = %{drb_ver}
Provides: rubygem(fiddle) = %{fiddle_ver}
Provides: rubygem(getoptlong) = %{getoptlong_ver}
Provides: rubygem(logger) = %{logger_ver}
Provides: rubygem(matrix) = %{matrix_ver}
Provides: rubygem(mutex_m) = %{mutex_m_ver}
Provides: rubygem(net-ftp) = %{net_ftp_ver}
Provides: rubygem(net-imap) = %{net_imap_ver}
Provides: rubygem(net-pop) = %{net_pop_ver}
Provides: rubygem(net-smtp) = %{net_smtp_ver}
Provides: rubygem(nkf) = %{nkf_ver}
Provides: rubygem(observer) = %{observer_ver}
Provides: rubygem(ostruct) = %{ostruct_ver}
Provides: rubygem(prime) = %{prime_ver}
Provides: rubygem(pstore) = %{pstore_ver}
Provides: rubygem(racc) = %{racc_ver}
Provides: rubygem(readline) = %{readline_ver}
Provides: rubygem(reline) = %{reline_ver}
Provides: rubygem(resolv-replace) = %{resolv_replace_ver}
Provides: rubygem(repl_type_completor) = %{repl_type_completor_ver}
Provides: rubygem(rinda) = %{rinda_ver}
Provides: rubygem(syslog) = %{syslog_ver}
%description bundled-gems
Bundled gems which are part of Ruby StdLib. While being part of Ruby,
these needs to be listed in Gemfile to be used by Bundler.
%prep
%setup -q -n %{oname}-%{pkg_version} -a2
#%patch3 -p1
%patch 4 -p1
%patch 5 -p1
%patch 6 -p1
%patch 9 -p1
%patch 12 -p1
%patch 13 -p1
%patch 14 -p1
# must be regenerated with new bison
%{__rm} parse.{c,h}
# Remove bundled libraries to be sure they are not used.
#%{__rm} -r ext/psych/yaml
#%{__rm} -r ext/fiddle/libffi*
# Install custom operating_system.rb.
install -d lib/rubygems/defaults
cp -p %{SOURCE6} lib/rubygems/defaults
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \
-o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \
| xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,'
%if %{with bootstrap}
# avoid regeneration, needs iostring module
touch enc/unicode/%{unicode_version}/*.h
%endif
%build
rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | sed 's/\.freeze//g' | xargs)
if [ $rubygems_ver != %{rubygems_ver} ]; then
echo "Set %%define rubygems_ver to $rubygems_ver and re-run."
exit 1
fi
rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' .bundle/gems/rdoc-*/lib/rdoc/version.rb | xargs)
if [ "$rdoc_ver" != %{rdoc_ver} ]; then
echo "Set %%define rdoc_ver to $rdoc_ver and re-run."
exit 1
fi
cp -f /usr/share/automake/config.sub .
%{__autoconf}
%configure \
%{?with_bootstrap:--with-baseruby="%{_bindir}/ruby -I$(pwd)/lib"} \
--program-suffix=%{ruby_suffix} \
--with-archlibdir=%{_libdir} \
--with-rubygemsdir=%{rubygems_dir} \
--with-rubylibprefix=%{ruby_libdir} \
--with-rubyarchprefix=%{ruby_archdir} \
--with-sitedir=%{ruby_sitelibdir} \
--with-sitearchdir=%{ruby_sitearchdir} \
--with-vendordir=%{ruby_vendorlibdir} \
--with-vendorarchdir=%{ruby_vendorarchdir} \
--with-rubyhdrdir=%{_includedir}/%{oname}-%{ruby_version} \
--with-rubyarchhdrdir=%{_includedir}/%{oname}-%{ruby_version} \
--with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \
--with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \
--without-compress-debug-sections \
--enable-mkmf-verbose \
%{__enable_disable yjit} \
%{__enable_disable zjit} \
%ifarch x32
--with-coroutine=ucontext \
%endif
--enable-multiarch \
--enable-shared \
--disable-install-doc \
--disable-rpath \
--disable-rubygems \
%{__enable_disable dtrace} \
--with-ruby-version='' \
%{__make} -j1 main \
COPY="cp -p" \
V=1
%if %{with doc}
%{__make} -j1 rdoc
%endif
%if %{with tests}
# unset these, as testsuite does "git commit" somewhere, which points to pld .spec repo. doh
unset GIT_DIR GIT_WORK_TREE
unset GIT
DISABLE_TESTS=""
%ifarch armv7l armv7hl armv7hnl
# test_call_double(DL::TestDL) fails on ARM HardFP
# http://bugs.ruby-lang.org/issues/6592
DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS"
%endif
# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode,
# when abrt.rb cannot be required (seems to be easier way then customizing
# the test suite).
touch abrt.rb
# TestSignal#test_hup_me hangs up the test suite.
# http://bugs.ruby-lang.org/issues/8997
sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb
# Fix "Could not find 'minitest'" error.
# http://bugs.ruby-lang.org/issues/9259
sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb
# Segmentation fault.
# https://bugs.ruby-lang.org/issues/9198
sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb
# Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode
# not allowed" error.
# https://bugs.ruby-lang.org/issues/10229
sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \
next if /wrap/ =~ name' test/openssl/test_cipher.rb
# Test is broken due to SSLv3 disabled in Fedora.
# https://bugs.ruby-lang.org/issues/10046
sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb
%{__make} check TESTS="-v $DISABLE_TESTS"
%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{ruby_ridir}} \
$RPM_BUILD_ROOT%{ruby_vendorarchdir} \
$RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \
$RPM_BUILD_ROOT%{ruby_vendorlibdir}/data
%{__make} install %{?with_doc:install-doc -j1} \
DESTDIR=$RPM_BUILD_ROOT
# Version is empty if --with-ruby-version is specified.
# http://bugs.ruby-lang.org/issues/7807
sed -i -e 's/Version: \${ruby_version}/Version: %{ruby_version}/' $RPM_BUILD_ROOT%{_pkgconfigdir}/%{oname}-%{ruby_version}.pc
# Kill bundled certificates, as they should be part of ca-certificates.
for cert in \
GlobalSign.pem \
; do
%{__rm} $RPM_BUILD_ROOT%{rubygems_dir}/rubygems/ssl_certs/*/$cert
done
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}
cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}
%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html
# detect this runtime, "make install" is affected by operating_system.rb what is installed in system!
gem_dir=$(./miniruby -Ilib -I. -I.ext/common ./tool/runruby.rb -- --disable-gems -r$(basename *-linux*-fake.rb .rb) -r rubygems -e 'puts Gem.default_dir')
# Move gems root into common directory, out of Ruby directory structure.
install -d $RPM_BUILD_ROOT%{gem_dir}
%{__mv} $RPM_BUILD_ROOT${gem_dir}/{gems,specifications} $RPM_BUILD_ROOT%{gem_dir}
# Move bundled rubygems to %gem_dir
# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems
# make symlinks for all packages, so they would work without rubygems
# NOTE: when making symlinks, do not symlink paths that could be directories,
# as there may came files from other packages as well. actually, unlikely as
# the links to got system dir and only ruby may package there (other distro
# packages should go to vendor dirs)
%if 0
install -d $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/rake* $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib
ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake $RPM_BUILD_ROOT%{ruby_libdir}
ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake.rb $RPM_BUILD_ROOT%{ruby_libdir}
%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/rake-%{rake_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications
%endif
# rdoc is a bundled gem in 4.0, already properly placed by make install
install -d $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib
install -d $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io
touch $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/gem.build_complete
%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/io $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io
%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/io-console-%{io_console_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications
ln -s %{gem_dir}/gems/io-console-%{io_console_ver}/lib/io $RPM_BUILD_ROOT%{ruby_libdir}/io
ln -s %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so
install -d $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib
install -d $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib
touch $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/gem.build_complete
%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/json* $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/json $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/json-%{json_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications
ln -s %{gem_dir}/gems/json-%{json_ver}/lib/json $RPM_BUILD_ROOT%{ruby_libdir}/json
ln -s %{gem_dir}/gems/json-%{json_ver}/lib/json.rb $RPM_BUILD_ROOT%{ruby_libdir}/json.rb
install -d $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext
ln -s %{gem_libdir}/json-%{json_ver}/lib/json/ext/parser.so $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext
ln -s %{gem_libdir}/json-%{json_ver}/lib/json/ext/generator.so $RPM_BUILD_ROOT%{ruby_libarchdir}/json/ext
ln -s %{gem_dir}/gems/minitest-%{minitest_ver}/lib/minitest $RPM_BUILD_ROOT%{ruby_libdir}
install -d $RPM_BUILD_ROOT%{ruby_libdir}/test
ln -s %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib/test/unit $RPM_BUILD_ROOT%{ruby_libdir}/test
install -d $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib
install -d $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib
touch $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/gem.build_complete
%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/psych* $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/psych.so $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib/
%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/psych-%{psych_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications
ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych $RPM_BUILD_ROOT%{ruby_libdir}/psych
ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych.rb $RPM_BUILD_ROOT%{ruby_libdir}/psych.rb
ln -s %{gem_libdir}/psych-%{psych_ver}/lib/psych.so $RPM_BUILD_ROOT%{ruby_archdir}/psych.so
install -d $RPM_BUILD_ROOT%{gem_dir}/gems/bundler-%{bundler_ver}/lib
install -d $RPM_BUILD_ROOT%{gem_libdir}/bundler-%{bundler_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/bundler* $RPM_BUILD_ROOT%{gem_dir}/gems/bundler-%{bundler_ver}/lib
%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/bundler-%{bundler_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications
ln -s %{gem_dir}/gems/bundler-%{bundler_ver}/lib/bundler $RPM_BUILD_ROOT%{ruby_libdir}/bundler
ln -s %{gem_dir}/gems/bundler-%{bundler_ver}/lib/bundler.rb $RPM_BUILD_ROOT%{ruby_libdir}/bundler.rb
# Move the binary extensions into proper place (if no gem has binary extension,
# the extensions directory might be empty).
# https://github.com/ruby/ruby/blob/5483bfc/configure.ac#L280
if [ -n "%{?_gnu}" ] && [ "%{?_gnu}" != "-gnu" ] && [[ "%{_target_platform}" = *%{?_gnu} ]]; then
abi=$(echo "%{?_gnu}" | sed 's/^-gnu/-/')
fi
find $RPM_BUILD_ROOT${gem_dir}/extensions/*-%{_target_os}$abi/%{ruby_version}.*/* -maxdepth 0 \
-exec mv '{}' $RPM_BUILD_ROOT%{_libdir}/gems/%{name}/ \; \
|| echo "No gem binary extensions to move."
# Clean up gem cache and leftover directories from gem_dir (outside system paths)
%{__rm} -rf $RPM_BUILD_ROOT${gem_dir}
# ruby binary is installed in arch-specific dir with symlink from %{_bindir};
# move it to %{_bindir} directly (https://bugs.ruby-lang.org/issues/20800)
if [ -L $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix} ]; then
%{__rm} $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix}
%{__mv} $RPM_BUILD_ROOT%{_prefix}/*-pld-linux-gnu*/bin/ruby%{ruby_suffix} $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix}
fi
%{__rm} -rf $RPM_BUILD_ROOT%{_prefix}/*-pld-linux-gnu*
# replace default irb with its not gemified version
%{__mv} $RPM_BUILD_ROOT%{gem_dir}/gems/irb-%{irb_ver}/exe/irb $RPM_BUILD_ROOT%{_bindir}/irb%{ruby_suffix}
# add ruby_suffix to syntax_suggest
[ -n "%{ruby_suffix}" ] && mv $RPM_BUILD_ROOT%{_bindir}/syntax_suggest $RPM_BUILD_ROOT%{_bindir}/syntax_suggest%{ruby_suffix}
# Adjust the gemspec files so that the gems will load properly
sed -i '/^end$/ i\
s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rake-%{rake_ver}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["io/console.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]\
s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/json-%{json_ver}.gemspec
sed -i '/^end$/ i\
s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec
# Push the .gemspecs through the RubyGems to let them write the stub headers.
# This speeds up loading of libraries and avoids warnings in Spring:
# https://github.com/rubygems/rubygems/pull/694
for s in rake-%{rake_ver}.gemspec rdoc-%{rdoc_ver}.gemspec json-%{json_ver}.gemspec; do
s="$RPM_BUILD_ROOT%{gem_dir}/specifications/$s"
%{__make} runruby TESTRUN_SCRIPT="-rrubygems \
-e \"spec = Gem::Specification.load('$s')\" \
-e \"File.write '$s', spec.to_ruby\""
done
%{__sed} -i -e '1s,/usr/bin/env ruby,/usr/bin/ruby,' \
$RPM_BUILD_ROOT%{_bindir}/irb \
$RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/exe/rake \
$RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/exe/{rdoc,ri} \
$RPM_BUILD_ROOT%{gem_dir}/gems/bundler-%{bundler_ver}/exe/{bundle,bundler} \
$RPM_BUILD_ROOT%{gem_dir}/gems/debug-%{debug_ver}/exe/rdbg \
$RPM_BUILD_ROOT%{gem_dir}/gems/rbs-%{rbs_ver}/exe/rbs \
$RPM_BUILD_ROOT%{gem_dir}/gems/erb-%{erb_ver}/libexec/erb \
$RPM_BUILD_ROOT%{gem_dir}/gems/typeprof-%{typeprof_ver}/bin/typeprof \
$RPM_BUILD_ROOT%{gem_dir}/gems/syntax_suggest-*/exe/syntax_suggest \
$RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{cal,test,time,uumerge}.rb \
$RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{logger,openssl,ripper}/*.rb
# gem non library files
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/matrix-%{matrix_ver}/[A-Z]*
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/{[A-Z]*,bin,test}
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-ftp-%{net_ftp_ver}/[A-Z]*
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-pop-%{net_pop_ver}/[A-Z]*
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-imap-%{net_imap_ver}/{[A-Z]*,docs}
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-smtp-%{net_smtp_ver}/[A-Z]*