/[packages]/cauldron/ruby/current/SPECS/ruby.spec
ViewVC logotype

Contents of /cauldron/ruby/current/SPECS/ruby.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1154814 - (show annotations) (download)
Sat Sep 16 17:27:26 2017 UTC (6 years, 7 months ago) by pterjan
File size: 25707 byte(s)
json is now in a separate package
1 # Taken from the fedora ruby-2.2.3 .spec. Thanks!
2
3 %global major_version 2
4 %global minor_version 4
5 %global teeny_version 1
6 %global major_minor_version %{major_version}.%{minor_version}
7
8 %global ruby_version %{major_minor_version}.%{teeny_version}
9 %global ruby_release %{ruby_version}
10
11 # Specify the named version. It has precedense to revision.
12 #%%global milestone rc1
13
14 # Keep the revision enabled for pre-releases from SVN.
15 #%%global revision 48936
16
17 %global ruby_archive %{name}-%{ruby_version}
18
19 # If revision and milestone are removed/commented out, the official release build is expected.
20 %if 0%{?milestone:1}%{?revision:1} != 0
21 %global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}}
22 %global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}}
23 %endif
24
25
26 %define rel 15
27 %{!?release_string:%global release_string %mkrel %{?development_release:0.}%{rel}%{?development_release:.%{development_release}}}
28
29 # The RubyGems library has to stay out of Ruby directory three, since the
30 # RubyGems should be share by all Ruby implementations.
31 %global rubygems_dir %{_datadir}/rubygems
32
33 # Bundled libraries versions
34 %global rubygems_version 2.6.11
35 %global molinillo_version 0.5.7
36
37 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
38 # http://redmine.ruby-lang.org/issues/5313
39 %global irb_version %{ruby_version}
40 %global bigdecimal_version 1.3.0
41 %global did_you_mean_version 1.1.0
42 %global io_console_version 0.4.6
43 %global json_version 2.0.2
44 %global minitest_version 5.10.1
45 %global net_telnet_version 0.1.1
46 %global openssl_version 2.0.3
47 %global power_assert_version 0.4.1
48 %global psych_version 2.2.2
49 %global rake_version 12.0.0
50 %global rdoc_version 5.0.0
51 %global test_unit_version 3.2.3
52 %global xmlrpc_version 0.2.1
53
54 # Allow updating them in separate packages
55 %global build_rubygems 0
56 %global build_bigdecimal 0
57 %global build_json 0
58 %global build_minitest 0
59 %global build_rake 1
60
61 %if %build_bigdecimal
62 %global exclude_bigdecimal %nil
63 %else
64 %global exclude_bigdecimal %exclude
65 %endif
66 %if %build_json
67 %global exclude_json %nil
68 %else
69 %global exclude_json %exclude
70 %endif
71 %if %build_minitest
72 %global exclude_minitest %nil
73 %else
74 %global exclude_minitest %exclude
75 %endif
76 %if %build_rake
77 %global exclude_rake %nil
78 %else
79 %global exclude_rake %exclude
80 %endif
81
82 # Might not be needed in the future, if we are lucky enough.
83 # https://bugzilla.redhat.com/show_bug.cgi?id=888262
84 %global tapset_root %{_datadir}/systemtap
85 %global tapset_dir %{tapset_root}/tapset
86 %global tapset_libdir %(echo %{_libdir} | sed 's/64//')*
87
88 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/')
89
90 %global with_rubypick 1
91
92 # Additional defines by Mageia.
93
94 %define subver %{major_minor_version}
95 %define rubyapi %{subver}.1
96 %define rubyver %{ruby_version}
97
98 %define libname %mklibname ruby %{subver}
99
100 %global ruby_libdir %{_datadir}/%{name}
101 %global ruby_libarchdir %{_libdir}/%{name}
102
103 # This is the local lib/arch and should not be used for packaging.
104 %global ruby_sitedir site_ruby
105 %global ruby_sitelibdir %{_prefix}/local/share/%{name}/%{ruby_sitedir}
106 %global ruby_sitearchdir %{_prefix}/local/%{_lib}/%{name}/%{ruby_sitedir}
107
108 # This is the general location for libs/archs compatible with all
109 # or most of the Ruby versions available in the Fedora repositories.
110 %global ruby_vendordir vendor_ruby
111 %global ruby_vendorlibdir %{ruby_libdir}/%{ruby_vendordir}
112 %global ruby_vendorarchdir %{ruby_libarchdir}/%{ruby_vendordir}
113
114 # The RubyGems library has to stay out of Ruby directory tree, since the
115 # RubyGems should be shared by all Ruby implementations.
116 %define gem_dir %{_datadir}/gems
117
118 Summary: Object Oriented Script Language
119 Name: ruby
120 Version: %{rubyver}
121 Release: %release_string
122 License: Ruby or BSD
123 Group: Development/Ruby
124 BuildRequires: autoconf
125 BuildRequires: byacc
126 BuildRequires: doxygen
127 BuildRequires: ncurses-devel
128 BuildRequires: readline-devel
129 BuildRequires: db-devel
130 BuildRequires: gdbm-devel >= 1.8.3
131 BuildRequires: openssl-devel
132 BuildRequires: zlib-devel
133 BuildRequires: libffi-devel
134 BuildRequires: yaml-devel
135 BuildRequires: rpm-mageia-setup >= 1.158
136 # Needed to pass test_set_program_name(TestRubyOptions)
137 BuildRequires: procps
138 # This causes gems to be installed in the home directory and breaks build
139 BuildConflicts: ruby-RubyGems
140 Conflicts: ruby-devel < 2.0.0.p451-4.mga5
141 Obsoletes: ruby-rexml
142 Provides: ruby-rexml
143 # Tcl/Tk support was removed from stdlib in Ruby 2.4
144 Obsoletes: ruby-tk < 2.4.0
145 # explicit file provides (since such requires are automatically added by find-requires)
146 Provides: /usr/bin/ruby
147 Provides: ruby(abi) = %subver
148 Requires: ruby-RubyGems >= %rubygems_version
149 Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}.tar.xz
150 Source1: operating_system.rb
151 Source3: ruby.macros
152 Source4: rubygems.macros
153 # From FC:
154 # RPM dependency generators.
155 Source8: rubygems.attr
156 Source9: rubygems.req
157 Source10: rubygems.prov
158 URL: http://ruby-lang.org/
159
160 # == FEDORA PATCHES BEGINS ==
161 # Fix ruby_version abuse.
162 # https://bugs.ruby-lang.org/issues/11002
163 Patch0: ruby-2.3.0-ruby_version.patch
164 # http://bugs.ruby-lang.org/issues/7807
165 Patch1: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
166 # Allows to override libruby.so placement. Hopefully we will be able to return
167 # to plain --with-rubyarchprefix.
168 # http://bugs.ruby-lang.org/issues/8973
169 Patch2: ruby-2.1.0-Enable-configuration-of-archlibdir.patch
170 # Force multiarch directories for i.86 to be always named i386. This solves
171 # some differencies in build between Fedora and RHEL.
172 Patch3: ruby-2.1.0-always-use-i386.patch
173 # Allows to install RubyGems into custom directory, outside of Ruby's tree.
174 # http://bugs.ruby-lang.org/issues/5617
175 Patch4: ruby-2.1.0-custom-rubygems-location.patch
176 # Make mkmf verbose by default
177 Patch5: ruby-1.9.3-mkmf-verbose.patch
178 # Adds support for '--with-prelude' configuration option. This allows to built
179 # in support for ABRT.
180 # http://bugs.ruby-lang.org/issues/8566
181 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
182 # Use miniruby to regenerate prelude.c.
183 # https://bugs.ruby-lang.org/issues/10554
184 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch
185 # Workaround "an invalid stdio handle" error on PPC, due to recently introduced
186 # hardening features of glibc (rhbz#1361037).
187 # https://bugs.ruby-lang.org/issues/12666
188 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
189 # Fix OpenSSL::TestSSL#test_sslctx_set_params failures due to recent changes in
190 # OpenSSL.
191 # https://github.com/ruby/openssl/issues/127
192 Patch10: ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch
193 # == FEDORA PATCHES ENDS ==
194 # operating_system.rb sets default_dir to user_dir for non root, this causes the build
195 # to install gems into user dir
196 #Patch20: ruby-2.3.0-Do-not-install-to-user-dir.patch
197
198 %package -n %{libname}
199 Summary: Libraries necessary to run Ruby
200 Group: Development/Ruby
201
202 %package doc
203 Summary: Documentation for the powerful language Ruby
204 Group: Development/Ruby
205 BuildArch: noarch
206
207 %package devel
208 Summary: Development file for the powerful language Ruby
209 Group: Development/Ruby
210 Requires: %{name} = %{version}
211 Requires: %{libname} = %{version}
212
213 %if %build_rubygems
214 %package RubyGems
215 Summary: The Ruby standard for packaging ruby libraries
216 Group: Development/Ruby
217 Version: %{rubygems_version}
218 Requires: ruby(abi) = %{subver}
219 Requires: rubygem(json) >= %{json_version}
220 Requires: rubygem(openssl) >= %{openssl_version}
221 Requires: rubygem(psych) >= %{psych_version}
222 # This should probably not be a strict require but --rdoc/--ri fail badly without it
223 Requires: rubygem(rdoc) >= %{rdoc_version}
224 Provides: gem = %{rubygems_version}
225 Provides: rubygems = %{rubygems_version}
226 Provides: ruby(rubygems) = %{rubygems_version}
227 Conflicts: rpm-mageia-setup-build < 1.159
228 Conflicts: ruby < 2.4.1-10
229 BuildArch: noarch
230 %endif
231
232 %if %build_rake
233 %package rake
234 Summary: Simple ruby build program with capabilities similar to make
235 Group: Development/Ruby
236 Version: %{rake_version}
237 Requires: ruby(abi) = %{subver}
238 Provides: rubygem(rake) = %{version}
239 BuildArch: noarch
240 %endif
241
242 %if %build_minitest
243 %package minitest
244 Summary: Minitest provides a complete suite of testing facilities
245 Group: Development/Ruby
246 Version: %{minitest_version}
247 License: MIT
248 Requires: ruby(abi) = %{subver}
249 Requires: ruby(rubygems) >= %{rubygems_version}
250 Provides: rubygem(minitest) = %{version}
251 BuildArch: noarch
252 %endif
253
254 %package openssl
255 Summary: OpenSSL provides SSL, TLS and general purpose cryptography
256 Group: Development/Ruby
257 Version: %{openssl_version}
258 License: Ruby or BSD
259 Requires: ruby(abi) = %{subver}
260 Requires: ruby(rubygems) >= %{rubygems_version}
261 Provides: rubygem(openssl) = %{version}
262
263 %package power_assert
264 Summary: Power Assert for Ruby
265 Group: Development/Ruby
266 Version: %{power_assert_version}
267 License: BSD
268 Requires: ruby(abi) = %{subver}
269 Requires: ruby(rubygems) >= %{rubygems_version}
270 Provides: rubygem(power_assert) = %{version}
271 BuildArch: noarch
272
273 %if %build_json
274 %package json
275 Summary: This is a JSON implementation as a Ruby extension in C
276 Group: Development/Ruby
277 Version: %{json_version}
278 License: Ruby or GPLv2
279 Requires: ruby(abi) = %{subver}
280 Requires: ruby(rubygems) >= %{rubygems_version}
281 Provides: rubygem(json) = %{version}
282 Conflicts: ruby < 2.4.1
283 %endif
284
285 %package rdoc
286 Summary: A tool to generate HTML and command-line documentation for Ruby projects
287 Group: Development/Ruby
288 Version: %{rdoc_version}
289 License: GPLv2 and Ruby and MIT
290 Requires: ruby(abi) = %{subver}
291 Requires: ruby(rubygems) >= %{rubygems_version}
292 Requires: ruby(irb) = %{version}
293 Requires: rubygem(io-console) >= %{io_console_version}
294 Requires: rubygem(json) >= %{json_version}
295 Provides: rubygem(rdoc) = %{version}
296 Provides: rdoc = %{rdoc_version}
297 Provides: ri = %{rdoc_version}
298 BuildArch: noarch
299
300 %package irb
301 Summary: The Interactive Ruby
302 Group: Development/Ruby
303 Provides: irb = %{version}-%{release}
304 Provides: ruby(irb) = %{version}-%{release}
305 Conflicts: ruby < 1.9
306 BuildArch: noarch
307
308 %if %build_bigdecimal
309 %package bigdecimal
310 Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic
311 Group: Development/Ruby
312 Version: %{bigdecimal_version}
313 License: GPL+ or Artistic
314 Requires: ruby(abi) = %{subver}
315 Provides: rubygem(bigdecimal) = %{version}
316 Requires: ruby(rubygems) >= %{rubygems_version}
317 %endif
318
319 %package did_you_mean
320 Summary: "Did you mean?" experience in Ruby
321 Version: %{did_you_mean_version}
322 Group: Development/Ruby
323 License: MIT
324 Requires: ruby(rubygems) >= %{rubygems_version}
325 Provides: rubygem(did_you_mean) = %{version}
326
327 %package io-console
328 Summary: IO/Console is a simple console utilizing library
329 Group: Development/Ruby
330 Version: %{io_console_version}
331 Requires: ruby(abi) = %{subver}
332 Requires: ruby(rubygems) >= %{rubygems_version}
333 Provides: rubygem(io-console) = %{version}
334
335 %package psych
336 Summary: A libyaml wrapper for Ruby
337 Version: %{psych_version}
338 Group: Development/Ruby
339 License: MIT
340 Requires: ruby(abi) = %{subver}
341 Requires: ruby(rubygems) >= %{rubygems_version}
342 Provides: rubygem(psych) = %{version}
343 Conflicts: ruby < 2.4.1-11
344
345 %package net-telnet
346 Summary: Provides telnet client functionality
347 Version: %{net_telnet_version}
348 Group: Development/Ruby
349 Requires: ruby(rubygems) >= %{rubygems_version}
350 Provides: rubygem(net-telnet) = %{version}
351
352 %package test-unit
353 Summary: test/unit compatible API testing framework
354 Version: %{test_unit_version}
355 Group: Development/Ruby
356 License: MIT
357 Provides: rubygem(test-unit) = %{test_unit_version}
358 Requires: ruby(abi) = %{subver}
359 Requires: ruby(rubygems) >= %{rubygems_version}
360 Provides: rubygem(test-unit) = %{version}
361 Conflicts: ruby < 2.0.0
362 BuildArch: noarch
363
364 %package xmlrpc
365 Summary: XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP
366 Version: %{xmlrpc_version}
367 Group: Development/Ruby
368 License: Ruby or BSD
369 Requires: ruby(abi) = %{subver}
370 Requires: ruby(rubygems) >= %{rubygems_version}
371 Provides: rubygem(xmlrpc) = %{version}
372 BuildArch: noarch
373
374 %description
375 Ruby is the interpreted scripting language for quick and
376 easy object-oriented programming. It has many features to
377 process text files and to do system management tasks (as in
378 Perl). It is simple, straight-forward, and extensible.
379
380 %description doc
381 Ruby is the interpreted scripting language for quick and
382 easy object-oriented programming. It has many features to
383 process text files and to do system management tasks (as in
384 Perl). It is simple, straight-forward, and extensible.
385
386 This package contains the Ruby's documentation
387
388 %description -n %{libname}
389 This package includes the libruby, necessary to run Ruby.
390
391 %description devel
392 Ruby is the interpreted scripting language for quick and
393 easy object-oriented programming. It has many features to
394 process text files and to do system management tasks (as in
395 Perl). It is simple, straight-forward, and extensible.
396
397 This package contains the Ruby's devel files.
398
399 %if %build_rubygems
400 %description RubyGems
401 RubyGems is the Ruby standard for publishing and managing third party
402 libraries.
403 %endif
404
405 %if %build_rake
406 %description rake
407 Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
408 specified in standard Ruby syntax.
409 %endif
410
411 %description rdoc
412 RDoc produces HTML and command-line documentation for Ruby projects. RDoc
413 includes the 'rdoc' and 'ri' tools for generating and displaying online
414 documentation.
415
416 %if %build_json
417 %description json
418 This is a implementation of the JSON specification according to RFC 4627.
419 You can think of it as a low fat alternative to XML, if you want to store
420 data to disk or transmit it over a network rather than use a verbose
421 markup language.
422 %endif
423
424 %if %build_minitest
425 %description minitest
426 minitest/unit is a small and incredibly fast unit testing framework.
427
428 minitest/spec is a functionally complete spec engine.
429
430 minitest/benchmark is an awesome way to assert the performance of your
431 algorithms in a repeatable manner.
432
433 minitest/mock by Steven Baker, is a beautifully tiny mock object
434 framework.
435
436 minitest/pride shows pride in testing and adds coloring to your test
437 output.
438 %endif
439
440 %description openssl
441 OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the
442 OpenSSL library.
443
444 %description power_assert
445 Power Assert shows each value of variables and method calls in the expression.
446 It is useful for testing, providing which value wasn't correct when the
447 condition is not satisfied.
448
449 %description irb
450 The irb is acronym for Interactive Ruby. It evaluates ruby expression
451 from the terminal.
452
453 %if %build_bigdecimal
454 %description bigdecimal
455 Ruby provides built-in support for arbitrary precision integer arithmetic.
456 For example:
457
458 42**13 -> 1265437718438866624512
459
460 BigDecimal provides similar support for very large or very accurate floating
461 point numbers. Decimal arithmetic is also useful for general calculation,
462 because it provides the correct answers people expect–whereas normal binary
463 floating point arithmetic often introduces subtle errors because of the
464 conversion between base 10 and base 2.
465 %endif
466
467 %description did_you_mean
468 "did you mean?" experience in Ruby: the error message will tell you the right
469 one when you misspelled something.
470
471 %description io-console
472 IO/Console provides very simple and portable access to console. It doesn't
473 provide higher layer features, such like curses and readline.
474
475 %description psych
476 Psych is a YAML parser and emitter. Psych leverages
477 libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting
478 capabilities. In addition to wrapping libyaml, Psych also knows how to
479 serialize and de-serialize most Ruby objects to and from the YAML format.
480
481 %description net-telnet
482 Provides telnet client functionality.
483
484 This class also has, through delegation, all the methods of a socket object
485 (by default, a TCPSocket, but can be set by the Proxy option to new()). This
486 provides methods such as close() to end the session and sysread() to read data
487 directly from the host, instead of via the waitfor() mechanism. Note that if
488 you do use sysread() directly when in telnet mode, you should probably pass
489 the output through preprocess() to extract telnet command sequences.
490
491 %description test-unit
492 This library implements test/unit compatible API on minitest.
493 The test/unit means that test/unit which was bundled with Ruby 1.8.
494
495 %description xmlrpc
496 XMLRPC is a lightweight protocol that enables remote procedure calls over
497 HTTP.
498
499 %prep
500 %setup -q -n ruby-%{rubyver}
501 %autopatch -p1
502
503 %build
504 autoconf
505 CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'`
506 %configure2_5x --enable-shared --disable-rpath --enable-pthread \
507 --enable-multiarch \
508 --with-rubylibprefix='%{ruby_libdir}' \
509 --with-archlibdir='%{_libdir}' \
510 --with-rubyarchprefix='%{ruby_libarchdir}' \
511 --with-sitedir='%{ruby_sitelibdir}' \
512 --with-sitearchdir='%{ruby_sitearchdir}' \
513 --with-vendordir='%{ruby_vendorlibdir}' \
514 --with-vendorarchdir='%{ruby_vendorarchdir}' \
515 --with-rubyhdrdir='%{_includedir}' \
516 --with-rubyarchhdrdir='%{_includedir}' \
517 --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \
518 --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \
519 --with-rubygemsdir='%{rubygems_dir}' \
520 --with-ruby-pc='%{name}.pc' \
521 --enable-multiarch \
522 --with-compress-debug-sections=no \
523 --with-ruby-version=''
524
525 %make_build Q=
526
527 %install
528 %makeinstall_std install-doc
529
530 # Version is empty if --with-ruby-version is specified.
531 # http://bugs.ruby-lang.org/issues/7807
532 sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
533
534 # Kill bundled certificates, as they should be part of ca-certificates.
535 for cert in \
536 rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \
537 rubygems.org/AddTrustExternalCARoot.pem \
538 index.rubygems.org/GlobalSignRootCA.pem
539 do
540 rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert
541 rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert)
542 done
543
544 # Ensure there is not forgotten any certificate.
545 test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)"
546
547 # Install emacs config
548 install -d %buildroot%{_datadir}/emacs/site-lisp
549 cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp
550
551 install -d %buildroot%{_sysconfdir}/emacs/site-start.d
552 cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el
553 (autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t)
554 (add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode))
555 (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
556 EOF
557
558 # Install the rpm macros
559 mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d
560 cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d
561
562 %if %build_rubygems
563 cp %{SOURCE4} %buildroot%{_sysconfdir}/rpm/macros.d
564
565 # Install dependency generators.
566 mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs
567 install -m 644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/fileattrs
568 install -m 755 %{SOURCE9} %{buildroot}%{_rpmconfigdir}
569 install -m 755 %{SOURCE10} %{buildroot}%{_rpmconfigdir}
570
571 # Install custom operating_system.rb
572 mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults
573 cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults
574 %else
575 rm -f %{buildroot}%{_bindir}/gem
576 rm -f %{buildroot}%{rubygems_dir}/{ubygems.rb,rubygems.rb}
577 rm -rf %{buildroot}%{rubygems_dir}/rubygems
578 %endif
579
580 # Move gems root into common direcotry, out of Ruby directory structure.
581 mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}
582
583 # Create folders for gem binary extensions.
584 mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name}
585
586 # Version is empty if --with-ruby-version is specified.
587 # http://bugs.ruby-lang.org/issues/7807
588 sed -i 's/Version: .*/Version: %{rubyver}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
589
590 # Move the binary extensions into proper place (if no gem has binary extension,
591 # the extensions directory might be empty).
592 find %{buildroot}%{gem_dir}/extensions/*-%{_target_os}/%{ruby_version}/* -maxdepth 0 \
593 -exec mv '{}' %{buildroot}%{_libdir}/gems/%{name}/ \; \
594 || echo "No gem binary extensions to move."
595
596 %if %build_json
597 # Adjust the gemspec files so that the gems will load properly
598 sed -i '/^end$/ i\
599 s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec
600 %endif
601
602 # Move man pages into proper location
603 mv %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/doc/rake.1 %{buildroot}%{_mandir}/man1
604
605 %check
606 DISABLE_TESTS=""
607
608 #make check TESTS="-v $DISABLE_TESTS"
609
610 %files
611 %{_bindir}/erb
612 %{_bindir}/ruby
613 %dir %{ruby_libdir}
614 %{ruby_libdir}/*.rb
615 %exclude %{ruby_libdir}/irb.rb
616 %exclude %{ruby_libdir}/json.rb
617 %exclude %{ruby_libdir}/openssl.rb
618 %{ruby_libdir}/cgi
619 %{ruby_libdir}/digest
620 %{ruby_libdir}/drb
621 %{ruby_libdir}/fiddle
622 %{ruby_libdir}/forwardable
623 %{ruby_libdir}/matrix
624 %{ruby_libdir}/net
625 %{ruby_libdir}/optparse
626 %{ruby_libdir}/racc
627 %{ruby_libdir}/rbconfig
628 %{ruby_libdir}/rexml
629 %{ruby_libdir}/rinda
630 %{ruby_libdir}/ripper
631 %{ruby_libdir}/rss
632 %{ruby_libdir}/shell
633 %{ruby_libdir}/syslog
634 %{ruby_libdir}/unicode_normalize/normalize.rb
635 %{ruby_libdir}/unicode_normalize/tables.rb
636 %{ruby_libdir}/uri
637 %{ruby_libdir}/webrick
638 %{ruby_libdir}/yaml
639 %dir %{ruby_libarchdir}
640 %{ruby_libarchdir}/cgi/escape.so
641 %{ruby_libarchdir}/continuation.so
642 %{ruby_libarchdir}/coverage.so
643 %{ruby_libarchdir}/date_core.so
644 %{ruby_libarchdir}/dbm.so
645 %dir %{ruby_libarchdir}/digest
646 %{ruby_libarchdir}/digest.so
647 %{ruby_libarchdir}/digest/*.so
648 %dir %{ruby_libarchdir}/enc
649 %{ruby_libarchdir}/enc/*.so
650 %dir %{ruby_libarchdir}/enc/trans
651 %{ruby_libarchdir}/enc/trans/*.so
652 %{ruby_libarchdir}/etc.so
653 %{ruby_libarchdir}/fcntl.so
654 %{ruby_libarchdir}/fiber.so
655 %{ruby_libarchdir}/fiddle.so
656 %{ruby_libarchdir}/gdbm.so
657 %dir %{ruby_libarchdir}/io
658 %{ruby_libarchdir}/io/nonblock.so
659 %{ruby_libarchdir}/io/wait.so
660 %dir %{ruby_libarchdir}/mathn
661 %{ruby_libarchdir}/mathn/*.so
662 %{ruby_libarchdir}/nkf.so
663 %{ruby_libarchdir}/objspace.so
664 %{ruby_libarchdir}/pathname.so
665 %{ruby_libarchdir}/pty.so
666 %dir %{ruby_libarchdir}/racc
667 %{ruby_libarchdir}/racc/*.so
668 %{ruby_libarchdir}/rbconfig.rb
669 %{ruby_libarchdir}/rbconfig/sizeof.so
670 %{ruby_libarchdir}/readline.so
671 %{ruby_libarchdir}/ripper.so
672 %{ruby_libarchdir}/sdbm.so
673 %{ruby_libarchdir}/socket.so
674 %{ruby_libarchdir}/stringio.so
675 %{ruby_libarchdir}/strscan.so
676 %{ruby_libarchdir}/syslog.so
677 %{ruby_libarchdir}/zlib.so
678 %{_mandir}/man1/erb.1.*
679 %{_mandir}/man1/ruby.1.*
680 %{_datadir}/emacs/site-lisp/*
681 %config(noreplace) %{_sysconfdir}/emacs/site-start.d/*
682 %{_sysconfdir}/rpm/macros.d/ruby.macros
683 %{_datadir}/ruby/vendor_ruby
684 %{_libdir}/ruby/vendor_ruby
685 %{rubygems_dir}/rbconfig
686 %dir %{gem_dir}/specifications/default
687
688 %files doc
689 %{_datadir}/ri
690 %{_datadir}/doc/ruby
691
692 %files -n %{libname}
693 %{_libdir}/libruby.so.%{subver}
694 %{_libdir}/libruby.so.%{rubyapi}
695
696 %files devel
697 %{_includedir}/*
698 %{_libdir}/libruby.so
699 %{_libdir}/pkgconfig/*.pc
700
701 %files irb
702 %{_bindir}/irb
703 %{ruby_libdir}/irb.rb
704 %{ruby_libdir}/irb
705 %{_mandir}/man1/irb.1*
706
707 %files power_assert
708 %{gem_dir}/gems/power_assert-%{power_assert_version}
709 %{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec
710
711 %files io-console
712 %{ruby_libdir}/io
713 %{ruby_libarchdir}/io/console.so
714 %{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec
715
716 %files test-unit
717 %{gem_dir}/gems/test-unit-*
718 %{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec
719
720 %if %build_rubygems
721 %files RubyGems
722 %{_bindir}/gem
723 %{_sysconfdir}/rpm/macros.d/rubygems.macros
724 %dir %{rubygems_dir}
725 %{rubygems_dir}/rubygems
726 %{rubygems_dir}/rubygems.rb
727 %{rubygems_dir}/ubygems.rb
728 %{_rpmconfigdir}/fileattrs/rubygems.attr
729 %{_rpmconfigdir}/rubygems.req
730 %{_rpmconfigdir}/rubygems.prov
731 %dir %{gem_dir}
732 %dir %{gem_dir}/build_info
733 %dir %{gem_dir}/cache
734 %dir %{gem_dir}/doc
735 %dir %{gem_dir}/extensions
736 %dir %{gem_dir}/gems
737 %dir %{gem_dir}/specifications
738 %endif
739 %exclude %{gem_dir}/cache/*
740
741 %if %build_minitest
742 %files minitest
743 %endif
744 %exclude_minitest %{gem_dir}/gems/minitest-%{minitest_version}
745 %exclude_minitest %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec
746
747 %if %build_rake
748 %files rake
749 %endif
750 %exclude_rake %{_bindir}/rake
751 %exclude_rake %{_mandir}/man1/rake.1.*
752 %exclude_rake %{gem_dir}/gems/rake-%{rake_version}
753 %exclude_rake %{gem_dir}/specifications/rake-%{rake_version}.gemspec
754
755 %files rdoc
756 %{_bindir}/rdoc
757 %{_bindir}/ri
758 %{_mandir}/man1/ri.1.*
759 %{ruby_libdir}/rdoc
760 %{gem_dir}/gems/rdoc-%{rdoc_version}
761 %{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec
762
763 %if %build_json
764 %files json
765 %endif
766 %exclude_json %{ruby_libarchdir}/json
767 %exclude_json %{ruby_libdir}/json
768 %exclude_json %{ruby_libdir}/json.rb
769 %exclude_json %{gem_dir}/specifications/default/json-%{json_version}.gemspec
770
771 %if %build_bigdecimal
772 %files bigdecimal
773 %endif
774 %exclude_bigdecimal %{ruby_libdir}/bigdecimal
775 %exclude_bigdecimal %{ruby_libarchdir}/bigdecimal.so
776 %exclude_bigdecimal %{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec
777
778 %files openssl
779 %{ruby_libdir}/openssl
780 %{ruby_libdir}/openssl.rb
781 %{ruby_libarchdir}/openssl.so
782 %{gem_dir}/specifications/default/openssl-%{openssl_version}.gemspec
783
784 %files psych
785 %{ruby_libdir}/psych
786 %{ruby_libdir}/psych.rb
787 %{ruby_libarchdir}/psych.so
788 %{gem_dir}/specifications/default/psych-%{psych_version}.gemspec
789
790 %files did_you_mean
791 %{gem_dir}/gems/did_you_mean-%{did_you_mean_version}
792 %exclude %{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/.*
793 %{gem_dir}/specifications/did_you_mean-%{did_you_mean_version}.gemspec
794
795 %files net-telnet
796 %{gem_dir}/gems/net-telnet-%{net_telnet_version}
797 %exclude %{gem_dir}/gems/net-telnet-%{net_telnet_version}/.*
798 %{gem_dir}/specifications/net-telnet-%{net_telnet_version}.gemspec
799
800 %files xmlrpc
801 %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}
802 %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec

  ViewVC Help
Powered by ViewVC 1.1.30