File rubygem-gem2rpm.spec of Package rubygem-gem2rpm
640
1
#
2
# spec file for package rubygem-gem2rpm
3
#
4
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
%bcond_without gem2rpm_bootstrap
20
%bcond_with ruby18
21
%bcond_with ruby19
22
%bcond_with ruby20
23
%bcond_with ruby21
24
%if ! (0%{?suse_version} == 1315)
25
%bcond_with ruby22
26
%endif
27
%bcond_with ruby23
28
%bcond_with ruby24
29
%bcond_with ruby25
30
%bcond_with rubinius25
31
32
Name: rubygem-gem2rpm
33
Version: 0.10.1
34
Release: 0
35
%define mod_name gem2rpm
36
%define mod_full_name %{mod_name}-%{version}
37
%define mod_branch -%{version}
38
%define mod_weight 1001
39
#define rb_build_versions %{rb_default_ruby}
40
BuildRoot: %{_tmppath}/%{name}-%{version}-build
41
BuildRequires: %{ruby}
42
BuildRequires: ruby-macros >= 5
43
%if %{with gem2rpm_bootstrap}
44
#!BuildIgnore: rubygem(gem2rpm) rubygem(ruby:2.1.0:gem2rpm) rubygem(ruby:2.2.0:gem2rpm) rubygem(rbx:2.2:gem2rpm)
45
%else
46
BuildRequires: %{rubygem gem2rpm}
47
%endif
48
BuildRequires: update-alternatives
49
Url: https://github.com/lutter/gem2rpm/
50
Source: http://rubygems.org/gems/%{mod_full_name}.gem
51
Source1: gem2rpm.yml.documentation
52
Source2: gem2rpm-opensuse
53
Source3: series
54
Patch01: 0001-use-the-ID-from-os-release-to-use-the-proper-templat.patch
55
Patch02: 0002-added-basic-config-file-support-to-gem2rpm-in-yaml-f.patch
56
Patch03: 0003-new-opensuse-templates.-they-require-the-config-file.patch
57
Patch04: 0004-added-example-gem2rpm.yml.patch
58
Patch05: 0005-properly-shorten-description-and-summary.patch
59
Patch06: 0006-Preserve-the-license-header-found-in-the-output-file.patch
60
Patch07: 0007-fixes-for-the-opensuse-template.patch
61
Patch08: 0008-do-not-use-not-.-not-supported-on-1.8-e.g.patch
62
Patch09: 0009-No-longer-require-the-ruby-version-inside-the-subpac.patch
63
Patch10: 0010-Try-to-load-rbconfigpackagingsupport-and-fail-gracef.patch
64
Patch11: 0011-Add-support-for-scripts-pre-post-for-subpackages.patch
65
Patch12: 0012-typo-in-gem2rpm.yml.documentation-custom_pkgs-instea.patch
66
Patch13: 0013-Also-tag-LICENSE-MIT-as-docfile.patch
67
Patch14: 0014-Refactor-into-multiple-lines.patch
68
Patch15: 0015-Add-licence-to-the-list-of-license-files-as-well.patch
69
Patch16: 0016-add-two-more-ways-to-express-changes.patch
70
Patch17: 0017-.markdown-is-also-seen-in-the-wild.patch
71
Patch18: 0018-Only-use-the-extensions-doc-dir-on-MRI-2.1.x.patch
72
Patch19: 0019-Cleaner-solution-for-the-extensions-doc-dir.patch
73
Patch20: 0020-Ruby-1.8-insists-on-the-for-the-parameter.patch
74
Patch21: 0021-Fix-company-name-in-copyright-header.patch
75
Patch22: 0022-add-the-touch-for-build-compare-to-the-template.patch
76
Patch23: 0023-Also-tag-APACHE-LICENSE-2.0-as-docfile.patch
77
Patch24: 0024-add-ability-to-provide-alternative-main-Source.patch
78
Patch25: 0025-allow-running-commands-after-patching.patch
79
Patch26: 0026-use-https-instead-of-http-for-rubygems.org.patch
80
# Patch27: enhances.patch
81
Summary: Generate rpm specfiles from gems
82
License: GPL-2.0+
83
Group: Development/Languages/Ruby
84
PreReq: update-alternatives
85
86
%description
87
Generate source rpms and rpm spec files from a Ruby Gem.
88
The spec file tries to follow the gem as closely as possible
89
90
%prep
91
%gem_unpack
92
%patch01 -p1
93
%patch02 -p1
94
%patch03 -p1
95
%patch04 -p1
96
%patch05 -p1
97
%patch06 -p1
98
%patch07 -p1
99
%patch08 -p1
100
%patch09 -p1
101
%patch10 -p1
102
%patch11 -p1
103
%patch12 -p1
104
%patch13 -p1
105
%patch14 -p1
106
%patch15 -p1
107
%patch16 -p1
108
%patch17 -p1
109
%patch18 -p1
110
%patch19 -p1
111
%patch20 -p1
112
%patch21 -p1
113
%patch22 -p1
114
%patch23 -p1
115
%patch24 -p1
116
%patch25 -p1
117
%patch26 -p1
118
#patch27 -p1
119
%build
120
%gem_build
121
122
%install
123
%gem_install -f --symlink-binaries --doc-files="AUTHORS LICENSE README"
124
for i in %{buildroot}%{_docdir}/*rubygem-gem2rpm*/ ; do
125
install -m 0644 %{S:1} $i/gem2rpm.yml
126
done
127
128
%if %{with gem2rpm_bootstrap}
129
%if %{with ruby21}
130
%package -n ruby2.1-rubygem-gem2rpm
131
Summary: Generate rpm specfiles from gems
132
Group: Development/Languages/Ruby
133
PreReq: update-alternatives
134
135
%description -n ruby2.1-rubygem-gem2rpm
136
Generate source rpms and rpm spec files from a Ruby Gem.
137
The spec file tries to follow the gem as closely as possible
138
139
%package -n ruby2.1-rubygem-gem2rpm-doc
140
Summary: RDoc documentation for %{mod_name}
141
Group: Development/Languages/Ruby
142
Requires: ruby2.1-rubygem-gem2rpm = %{version}
143
144
%description -n ruby2.1-rubygem-gem2rpm-doc
145
Documentation generated at gem installation time.
146
Usually in RDoc and RI formats.
147
148
149
%post -n ruby2.1-rubygem-gem2rpm
150
/usr/sbin/update-alternatives --install \
151
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.1-%{version} %{mod_weight}
152
/usr/sbin/update-alternatives --install \
153
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.1-%{version} %{mod_weight}
154
/usr/sbin/update-alternatives --install \
155
%{_bindir}/gem2rpm.ruby2.1 gem2rpm.ruby2.1 %{_bindir}/gem2rpm.ruby2.1-%{version} %{mod_weight}
156
157
%preun -n ruby2.1-rubygem-gem2rpm
158
if [ "$1" = 0 ] ; then
159
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.1-%{version}
160
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.1-%{version}
161
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.1 %{_bindir}/gem2rpm.ruby2.1-%{version}
162
fi
163
164
%files -n ruby2.1-rubygem-gem2rpm
165
%defattr(-,root,root,-)
166
%{_docdir}/ruby2.1-rubygem-gem2rpm
167
#{_bindir}/gem2rpm-opensuse
168
%{_bindir}/gem2rpm.ruby2.1-%{version}
169
%ghost %{_bindir}/gem2rpm.ruby2.1
170
%ghost %{_bindir}/gem2rpm-%{version}
171
%ghost %{_bindir}/gem2rpm
172
%ghost %{_sysconfdir}/alternatives/gem2rpm
173
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.1
174
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
175
# cache file
176
%{_libdir}/ruby/gems/2.1.0/cache/gem2rpm-%{version}.gem
177
%{_libdir}/ruby/gems/2.1.0/gems/gem2rpm-%{version}
178
%{_libdir}/ruby/gems/2.1.0/specifications/gem2rpm-%{version}.gemspec
179
180
%files -n ruby2.1-rubygem-gem2rpm-doc
181
%defattr(-,root,root,-)
182
%doc %{_libdir}/ruby/gems/2.1.0/doc/gem2rpm-%{version}
183
%endif
184
185
%if %{with ruby18}
186
%package -n ruby1.8-rubygem-gem2rpm
187
Summary: Generate rpm specfiles from gems
188
Group: Development/Languages/Ruby
189
PreReq: update-alternatives
190
191
%description -n ruby1.8-rubygem-gem2rpm
192
Generate source rpms and rpm spec files from a Ruby Gem.
193
The spec file tries to follow the gem as closely as possible
194
195
%package -n ruby1.8-rubygem-gem2rpm-doc
196
Summary: RDoc documentation for %{mod_name}
197
Group: Development/Languages/Ruby
198
Requires: ruby1.8-rubygem-gem2rpm = %{version}
199
200
%description -n ruby1.8-rubygem-gem2rpm-doc
201
Documentation generated at gem installation time.
202
Usually in RDoc and RI formats.
203
204
205
%post -n ruby1.8-rubygem-gem2rpm
206
/usr/sbin/update-alternatives --install \
207
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby1.8-%{version} %{mod_weight}
208
/usr/sbin/update-alternatives --install \
209
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.8-%{version} %{mod_weight}
210
/usr/sbin/update-alternatives --install \
211
%{_bindir}/gem2rpm.ruby1.8 gem2rpm.ruby1.8 %{_bindir}/gem2rpm.ruby1.8-%{version} %{mod_weight}
212
213
%preun -n ruby1.8-rubygem-gem2rpm
214
if [ "$1" = 0 ] ; then
215
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby1.8-%{version}
216
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.8-%{version}
217
/usr/sbin/update-alternatives --remove gem2rpm.ruby1.8 %{_bindir}/gem2rpm.ruby1.8-%{version}
218
fi
219
220
%files -n ruby1.8-rubygem-gem2rpm
221
%defattr(-,root,root,-)
222
%{_docdir}/ruby1.8-rubygem-gem2rpm
223
#{_bindir}/gem2rpm-opensuse
224
%{_bindir}/gem2rpm.ruby1.8-%{version}
225
%ghost %{_bindir}/gem2rpm.ruby1.8
226
%ghost %{_bindir}/gem2rpm-%{version}
227
%ghost %{_bindir}/gem2rpm
228
%ghost %{_sysconfdir}/alternatives/gem2rpm
229
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby1.8
230
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
231
# cache file
232
%{_libdir}/ruby/gems/1.8/cache/gem2rpm-%{version}.gem
233
%{_libdir}/ruby/gems/1.8/gems/gem2rpm-%{version}
234
%{_libdir}/ruby/gems/1.8/specifications/gem2rpm-%{version}.gemspec
235
236
%files -n ruby1.8-rubygem-gem2rpm-doc
237
%defattr(-,root,root,-)
238
%doc %{_libdir}/ruby/gems/1.8/doc/gem2rpm-%{version}
239
%endif
240
241
%if %{with ruby19}
242
%package -n ruby1.9-rubygem-gem2rpm
243
Summary: Generate rpm specfiles from gems
244
Group: Development/Languages/Ruby
245
PreReq: update-alternatives
246
247
%description -n ruby1.9-rubygem-gem2rpm
248
Generate source rpms and rpm spec files from a Ruby Gem.
249
The spec file tries to follow the gem as closely as possible
250
251
%package -n ruby1.9-rubygem-gem2rpm-doc
252
Summary: RDoc documentation for %{mod_name}
253
Group: Development/Languages/Ruby
254
Requires: ruby1.9-rubygem-gem2rpm = %{version}
255
256
%description -n ruby1.9-rubygem-gem2rpm-doc
257
Documentation generated at gem installation time.
258
Usually in RDoc and RI formats.
259
260
261
%post -n ruby1.9-rubygem-gem2rpm
262
/usr/sbin/update-alternatives --install \
263
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby1.9-%{version} %{mod_weight}
264
/usr/sbin/update-alternatives --install \
265
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.9-%{version} %{mod_weight}
266
/usr/sbin/update-alternatives --install \
267
%{_bindir}/gem2rpm.ruby1.9 gem2rpm.ruby1.9 %{_bindir}/gem2rpm.ruby1.9-%{version} %{mod_weight}
268
269
%preun -n ruby1.9-rubygem-gem2rpm
270
if [ "$1" = 0 ] ; then
271
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby1.9-%{version}
272
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby1.9-%{version}
273
/usr/sbin/update-alternatives --remove gem2rpm.ruby1.9 %{_bindir}/gem2rpm.ruby1.9-%{version}
274
fi
275
276
%files -n ruby1.9-rubygem-gem2rpm
277
%defattr(-,root,root,-)
278
%{_docdir}/ruby1.9-rubygem-gem2rpm
279
#{_bindir}/gem2rpm-opensuse
280
%{_bindir}/gem2rpm.ruby1.9-%{version}
281
%ghost %{_bindir}/gem2rpm.ruby1.9
282
%ghost %{_bindir}/gem2rpm-%{version}
283
%ghost %{_bindir}/gem2rpm
284
%ghost %{_sysconfdir}/alternatives/gem2rpm
285
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby1.9
286
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
287
# cache file
288
%{_libdir}/ruby/gems/1.9.1/cache/gem2rpm-%{version}.gem
289
%{_libdir}/ruby/gems/1.9.1/gems/gem2rpm-%{version}
290
%{_libdir}/ruby/gems/1.9.1/specifications/gem2rpm-%{version}.gemspec
291
292
%files -n ruby1.9-rubygem-gem2rpm-doc
293
%defattr(-,root,root,-)
294
%doc %{_libdir}/ruby/gems/1.9.1/doc/gem2rpm-%{version}
295
%endif
296
297
%if %{with ruby20}
298
%package -n ruby2.0-rubygem-gem2rpm
299
Summary: Generate rpm specfiles from gems
300
Group: Development/Languages/Ruby
301
PreReq: update-alternatives
302
303
%description -n ruby2.0-rubygem-gem2rpm
304
Generate source rpms and rpm spec files from a Ruby Gem.
305
The spec file tries to follow the gem as closely as possible
306
307
%package -n ruby2.0-rubygem-gem2rpm-doc
308
Summary: RDoc documentation for %{mod_name}
309
Group: Development/Languages/Ruby
310
Requires: ruby2.0-rubygem-gem2rpm = %{version}
311
312
%description -n ruby2.0-rubygem-gem2rpm-doc
313
Documentation generated at gem installation time.
314
Usually in RDoc and RI formats.
315
316
317
%post -n ruby2.0-rubygem-gem2rpm
318
/usr/sbin/update-alternatives --install \
319
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.0-%{version} %{mod_weight}
320
/usr/sbin/update-alternatives --install \
321
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.0-%{version} %{mod_weight}
322
/usr/sbin/update-alternatives --install \
323
%{_bindir}/gem2rpm.ruby2.0 gem2rpm.ruby2.0 %{_bindir}/gem2rpm.ruby2.0-%{version} %{mod_weight}
324
325
%preun -n ruby2.0-rubygem-gem2rpm
326
if [ "$1" = 0 ] ; then
327
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.0-%{version}
328
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.0-%{version}
329
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.0 %{_bindir}/gem2rpm.ruby2.0-%{version}
330
fi
331
332
%files -n ruby2.0-rubygem-gem2rpm
333
%defattr(-,root,root,-)
334
%{_docdir}/ruby2.0-rubygem-gem2rpm
335
#{_bindir}/gem2rpm-opensuse
336
%{_bindir}/gem2rpm.ruby2.0-%{version}
337
%ghost %{_bindir}/gem2rpm.ruby2.0
338
%ghost %{_bindir}/gem2rpm-%{version}
339
%ghost %{_bindir}/gem2rpm
340
%ghost %{_sysconfdir}/alternatives/gem2rpm
341
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.0
342
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
343
# cache file
344
%{_libdir}/ruby/gems/2.0.0/cache/gem2rpm-%{version}.gem
345
%{_libdir}/ruby/gems/2.0.0/gems/gem2rpm-%{version}
346
%{_libdir}/ruby/gems/2.0.0/specifications/gem2rpm-%{version}.gemspec
347
348
%files -n ruby2.0-rubygem-gem2rpm-doc
349
%defattr(-,root,root,-)
350
%doc %{_libdir}/ruby/gems/2.0.0/doc/gem2rpm-%{version}
351
%endif
352
353
%if %{with ruby22}
354
%package -n ruby2.2-rubygem-gem2rpm
355
Summary: Generate rpm specfiles from gems
356
Group: Development/Languages/Ruby
357
PreReq: update-alternatives
358
359
%description -n ruby2.2-rubygem-gem2rpm
360
Generate source rpms and rpm spec files from a Ruby Gem.
361
The spec file tries to follow the gem as closely as possible
362
363
%package -n ruby2.2-rubygem-gem2rpm-doc
364
Summary: RDoc documentation for %{mod_name}
365
Group: Development/Languages/Ruby
366
Requires: ruby2.2-rubygem-gem2rpm = %{version}
367
368
%description -n ruby2.2-rubygem-gem2rpm-doc
369
Documentation generated at gem installation time.
370
Usually in RDoc and RI formats.
371
372
373
%post -n ruby2.2-rubygem-gem2rpm
374
/usr/sbin/update-alternatives --install \
375
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.2-%{version} %{mod_weight}
376
/usr/sbin/update-alternatives --install \
377
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.2-%{version} %{mod_weight}
378
/usr/sbin/update-alternatives --install \
379
%{_bindir}/gem2rpm.ruby2.2 gem2rpm.ruby2.2 %{_bindir}/gem2rpm.ruby2.2-%{version} %{mod_weight}
380
381
%preun -n ruby2.2-rubygem-gem2rpm
382
if [ "$1" = 0 ] ; then
383
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.2-%{version}
384
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.2-%{version}
385
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.2 %{_bindir}/gem2rpm.ruby2.2-%{version}
386
fi
387
388
%files -n ruby2.2-rubygem-gem2rpm
389
%defattr(-,root,root,-)
390
%{_docdir}/ruby2.2-rubygem-gem2rpm
391
#{_bindir}/gem2rpm-opensuse
392
%{_bindir}/gem2rpm.ruby2.2-%{version}
393
%ghost %{_bindir}/gem2rpm.ruby2.2
394
%ghost %{_bindir}/gem2rpm-%{version}
395
%ghost %{_bindir}/gem2rpm
396
%ghost %{_sysconfdir}/alternatives/gem2rpm
397
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.2
398
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
399
# cache file
400
%{_libdir}/ruby/gems/2.2.0/cache/gem2rpm-%{version}.gem
401
%{_libdir}/ruby/gems/2.2.0/gems/gem2rpm-%{version}
402
%{_libdir}/ruby/gems/2.2.0/specifications/gem2rpm-%{version}.gemspec
403
404
%files -n ruby2.2-rubygem-gem2rpm-doc
405
%defattr(-,root,root,-)
406
%doc %{_libdir}/ruby/gems/2.2.0/doc/gem2rpm-%{version}
407
%endif
408
409
%if %{with ruby23}
410
%package -n ruby2.3-rubygem-gem2rpm
411
Summary: Generate rpm specfiles from gems
412
Group: Development/Languages/Ruby
413
PreReq: update-alternatives
414
415
%description -n ruby2.3-rubygem-gem2rpm
416
Generate source rpms and rpm spec files from a Ruby Gem.
417
The spec file tries to follow the gem as closely as possible
418
419
%package -n ruby2.3-rubygem-gem2rpm-doc
420
Summary: RDoc documentation for %{mod_name}
421
Group: Development/Languages/Ruby
422
Requires: ruby2.3-rubygem-gem2rpm = %{version}
423
424
%description -n ruby2.3-rubygem-gem2rpm-doc
425
Documentation generated at gem installation time.
426
Usually in RDoc and RI formats.
427
428
429
%post -n ruby2.3-rubygem-gem2rpm
430
/usr/sbin/update-alternatives --install \
431
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.3-%{version} %{mod_weight}
432
/usr/sbin/update-alternatives --install \
433
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.3-%{version} %{mod_weight}
434
/usr/sbin/update-alternatives --install \
435
%{_bindir}/gem2rpm.ruby2.3 gem2rpm.ruby2.3 %{_bindir}/gem2rpm.ruby2.3-%{version} %{mod_weight}
436
437
%preun -n ruby2.3-rubygem-gem2rpm
438
if [ "$1" = 0 ] ; then
439
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.3-%{version}
440
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.3-%{version}
441
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.3 %{_bindir}/gem2rpm.ruby2.3-%{version}
442
fi
443
444
%files -n ruby2.3-rubygem-gem2rpm
445
%defattr(-,root,root,-)
446
%{_docdir}/ruby2.3-rubygem-gem2rpm
447
#{_bindir}/gem2rpm-opensuse
448
%{_bindir}/gem2rpm.ruby2.3-%{version}
449
%ghost %{_bindir}/gem2rpm.ruby2.3
450
%ghost %{_bindir}/gem2rpm-%{version}
451
%ghost %{_bindir}/gem2rpm
452
%ghost %{_sysconfdir}/alternatives/gem2rpm
453
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.3
454
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
455
# cache file
456
%{_libdir}/ruby/gems/2.3.0/cache/gem2rpm-%{version}.gem
457
%{_libdir}/ruby/gems/2.3.0/gems/gem2rpm-%{version}
458
%{_libdir}/ruby/gems/2.3.0/specifications/gem2rpm-%{version}.gemspec
459
460
%files -n ruby2.3-rubygem-gem2rpm-doc
461
%defattr(-,root,root,-)
462
%doc %{_libdir}/ruby/gems/2.3.0/doc/gem2rpm-%{version}
463
%endif
464
465
%if %{with ruby24}
466
%package -n ruby2.4-rubygem-gem2rpm
467
Summary: Generate rpm specfiles from gems
468
Group: Development/Languages/Ruby
469
PreReq: update-alternatives
470
471
%description -n ruby2.4-rubygem-gem2rpm
472
Generate source rpms and rpm spec files from a Ruby Gem.
473
The spec file tries to follow the gem as closely as possible
474
475
%package -n ruby2.4-rubygem-gem2rpm-doc
476
Summary: RDoc documentation for %{mod_name}
477
Group: Development/Languages/Ruby
478
Requires: ruby2.4-rubygem-gem2rpm = %{version}
479
480
%description -n ruby2.4-rubygem-gem2rpm-doc
481
Documentation generated at gem installation time.
482
Usually in RDoc and RI formats.
483
484
485
%post -n ruby2.4-rubygem-gem2rpm
486
/usr/sbin/update-alternatives --install \
487
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight}
488
/usr/sbin/update-alternatives --install \
489
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight}
490
/usr/sbin/update-alternatives --install \
491
%{_bindir}/gem2rpm.ruby2.4 gem2rpm.ruby2.4 %{_bindir}/gem2rpm.ruby2.4-%{version} %{mod_weight}
492
493
%preun -n ruby2.4-rubygem-gem2rpm
494
if [ "$1" = 0 ] ; then
495
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.4-%{version}
496
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.4-%{version}
497
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.4 %{_bindir}/gem2rpm.ruby2.4-%{version}
498
fi
499
500
%files -n ruby2.4-rubygem-gem2rpm
501
%defattr(-,root,root,-)
502
%{_docdir}/ruby2.4-rubygem-gem2rpm
503
#{_bindir}/gem2rpm-opensuse
504
%{_bindir}/gem2rpm.ruby2.4-%{version}
505
%ghost %{_bindir}/gem2rpm.ruby2.4
506
%ghost %{_bindir}/gem2rpm-%{version}
507
%ghost %{_bindir}/gem2rpm
508
%ghost %{_sysconfdir}/alternatives/gem2rpm
509
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.4
510
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
511
# cache file
512
%{_libdir}/ruby/gems/2.4.0/cache/gem2rpm-%{version}.gem
513
%{_libdir}/ruby/gems/2.4.0/gems/gem2rpm-%{version}
514
%{_libdir}/ruby/gems/2.4.0/specifications/gem2rpm-%{version}.gemspec
515
516
%files -n ruby2.4-rubygem-gem2rpm-doc
517
%defattr(-,root,root,-)
518
%doc %{_libdir}/ruby/gems/2.4.0/doc/gem2rpm-%{version}
519
%endif
520
521
%if %{with ruby25}
522
%package -n ruby2.5-rubygem-gem2rpm
523
Summary: Generate rpm specfiles from gems
524
Group: Development/Languages/Ruby
525
PreReq: update-alternatives
526
527
%description -n ruby2.5-rubygem-gem2rpm
528
Generate source rpms and rpm spec files from a Ruby Gem.
529
The spec file tries to follow the gem as closely as possible
530
531
%package -n ruby2.5-rubygem-gem2rpm-doc
532
Summary: RDoc documentation for %{mod_name}
533
Group: Development/Languages/Ruby
534
Requires: ruby2.5-rubygem-gem2rpm = %{version}
535
536
%description -n ruby2.5-rubygem-gem2rpm-doc
537
Documentation generated at gem installation time.
538
Usually in RDoc and RI formats.
539
540
541
%post -n ruby2.5-rubygem-gem2rpm
542
/usr/sbin/update-alternatives --install \
543
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm.ruby2.5-%{version} %{mod_weight}
544
/usr/sbin/update-alternatives --install \
545
%{_bindir}/gem2rpm-%{version} gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.5-%{version} %{mod_weight}
546
/usr/sbin/update-alternatives --install \
547
%{_bindir}/gem2rpm.ruby2.5 gem2rpm.ruby2.5 %{_bindir}/gem2rpm.ruby2.5-%{version} %{mod_weight}
548
549
%preun -n ruby2.5-rubygem-gem2rpm
550
if [ "$1" = 0 ] ; then
551
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm.ruby2.5-%{version}
552
/usr/sbin/update-alternatives --remove gem2rpm-%{version} %{_bindir}/gem2rpm.ruby2.5-%{version}
553
/usr/sbin/update-alternatives --remove gem2rpm.ruby2.5 %{_bindir}/gem2rpm.ruby2.5-%{version}
554
fi
555
556
%files -n ruby2.5-rubygem-gem2rpm
557
%defattr(-,root,root,-)
558
%{_docdir}/ruby2.5-rubygem-gem2rpm
559
#{_bindir}/gem2rpm-opensuse
560
%{_bindir}/gem2rpm.ruby2.5-%{version}
561
%ghost %{_bindir}/gem2rpm.ruby2.5
562
%ghost %{_bindir}/gem2rpm-%{version}
563
%ghost %{_bindir}/gem2rpm
564
%ghost %{_sysconfdir}/alternatives/gem2rpm
565
%ghost %{_sysconfdir}/alternatives/gem2rpm.ruby2.5
566
%ghost %{_sysconfdir}/alternatives/gem2rpm-%{version}
567
# cache file
568
%{_libdir}/ruby/gems/2.5.0/cache/gem2rpm-%{version}.gem
569
%{_libdir}/ruby/gems/2.5.0/gems/gem2rpm-%{version}
570
%{_libdir}/ruby/gems/2.5.0/specifications/gem2rpm-%{version}.gemspec
571
572
%files -n ruby2.5-rubygem-gem2rpm-doc
573
%defattr(-,root,root,-)
574
%doc %{_libdir}/ruby/gems/2.5.0/doc/gem2rpm-%{version}
575
%endif
576
577
%if %{with rubinius25}
578
%package -n rbx2.5-rubygem-gem2rpm
579
# MANUAL
580
# /MANUAL
581
Summary: Generate rpm specfiles from gems
582
Group: Development/Languages/Ruby
583
PreReq: update-alternatives
584
585
%description -n rbx2.5-rubygem-gem2rpm
586
Generate source rpms and rpm spec files from a Ruby Gem.
587
The spec file tries to follow the gem as closely as possible.
588
589
%package -n rbx2.5-rubygem-gem2rpm-doc
590
Summary: RDoc documentation for gem2rpm
591
Group: Development/Languages/Ruby
592
Requires: rbx2.5-rubygem-gem2rpm = %{version}
593
594
%description -n rbx2.5-rubygem-gem2rpm-doc
595
Documentation generated at gem installation time.
596
Usually in RDoc and RI formats.
597
598
599
%post -n rbx2.5-rubygem-gem2rpm
600
/usr/sbin/update-alternatives --install \
601
/usr/bin/gem2rpm gem2rpm /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight}
602
/usr/sbin/update-alternatives --install \
603
/usr/bin/gem2rpm-%{version} gem2rpm-%{version} /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight}
604
/usr/sbin/update-alternatives --install \
605
/usr/bin/gem2rpm.rbx2.5 gem2rpm.rbx2.5 /usr/bin/gem2rpm.rbx2.5-%{version} %{mod_weight}
606
607
%preun -n rbx2.5-rubygem-gem2rpm
608
if [ "$1" = 0 ] ; then
609
/usr/sbin/update-alternatives --remove gem2rpm /usr/bin/gem2rpm.rbx2.5-%{version}
610
/usr/sbin/update-alternatives --remove gem2rpm-%{version} /usr/bin/gem2rpm.rbx2.5-%{version}
611
/usr/sbin/update-alternatives --remove gem2rpm.rbx2.5 /usr/bin/gem2rpm.rbx2.5-%{version}
612
fi
613
614
%files -n rbx2.5-rubygem-gem2rpm
615
%defattr(-,root,root,-)
616
# MANUAL
617
# /MANUAL
618
/usr/share/doc/packages/rbx2.5-rubygem-gem2rpm
619
%{_bindir}/gem2rpm.rbx2.5-%{version}
620
%ghost %{_bindir}/gem2rpm.rbx2.5
621
%ghost %{_bindir}/gem2rpm-%{version}
622
%ghost %{_bindir}/gem2rpm
623
%ghost /etc/alternatives/gem2rpm
624
%ghost /etc/alternatives/gem2rpm.rbx2.5
625
%ghost /etc/alternatives/gem2rpm-%{version}
626
# cache file
627
%{_libdir}/rubinius/gems/2.5/cache/gem2rpm-%{version}.gem
628
%{_libdir}/rubinius/gems/2.5/gems/gem2rpm-%{version}
629
%{_libdir}/rubinius/gems/2.5/specifications/gem2rpm-%{version}.gemspec
630
631
%files -n rbx2.5-rubygem-gem2rpm-doc
632
%defattr(-,root,root,-)
633
%doc %{_libdir}/rubinius/gems/2.5/doc/gem2rpm-%{version}
634
%endif
635
%else
636
%gem_packages
637
%endif
638
639
%changelog
640