]> git.pld-linux.org Git - packages/ruby.git/blob - ruby.spec
2116320899546b7a327702598307aaeda88ef225
[packages/ruby.git] / ruby.spec
1 #
2 # TODO:
3 #       - include ext/ in docs
4 #       - replace ri with fastri
5 #       - patch ri to search multiple indexes (one per package), so RPMs can
6 #         install ri docs
7 #
8 # Conditional build:
9 %bcond_without  doc             # skip (time-consuming) docs generating; intended for speed up test builds
10 %bcond_without  tk              # skip building package with Tk bindings
11 %bcond_without  batteries       # Don't include rubygems, json or rake
12 %bcond_with     bootstrap       # build bootstrap version
13
14 %define         ruby_ver        1.9
15 %define         basever         1.9.3
16 %define         patchlevel      392
17 %define         doc_version     1_9_3
18 %define         json_ver        1.5.5
19 %define         rake_ver        0.9.2.2
20 %define         rubygems_ver    1.8.11
21 %define         minitest_ver    2.5.1
22 %define         rdoc_ver        3.9.5
23 Summary:        Ruby - interpreted scripting language
24 Summary(ja.UTF-8):      オブジェクト指向言語Rubyインタプリタ
25 Summary(pl.UTF-8):      Ruby - interpretowany język skryptowy
26 Summary(pt_BR.UTF-8):   Linguagem de script orientada a objeto
27 Summary(zh_CN.UTF-8):   ruby - 一种快速高效的面向对象脚本编程语言
28 Name:           ruby
29 Version:        %{basever}.%{patchlevel}
30 Release:        1
31 Epoch:          1
32 # Public Domain for example for: include/ruby/st.h, strftime.c, ...
33 License:        (Ruby or BSD) and Public Domain
34 Group:          Development/Languages
35 Source0:        ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_ver}/%{name}-%{basever}-p%{patchlevel}.tar.bz2
36 # Source0-md5:  a810d64e2255179d2f334eb61fb8519c
37 Source1:        http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz
38 # Source1-md5:  ad1af0043be98ba1a4f6d0185df63876
39 Source2:        http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz
40 # Source2-md5:  ec622612428672c432b6f65dd31a84b5
41 Source3:        http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_core_rdocs.tgz
42 # Source3-md5:  1892aadde51d36106c513bced2193dff
43 Source100:      ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.7-p330.tar.gz
44 # Source100-md5:        50a49edb787211598d08e756e733e42e
45 Source4:        rdoc.1
46 Source5:        testrb.1
47 Source6:        %{name}-mode-init.el
48 Patch0:         %{name}-lib64.patch
49 Patch1:         %{name}-ffs.patch
50 Patch2:         fix-bison-invocation.patch
51 URL:            http://www.ruby-lang.org/
52 BuildRequires:  autoconf >= 2.60
53 BuildRequires:  automake
54 BuildRequires:  bison
55 BuildRequires:  db-devel
56 BuildRequires:  gdbm-devel >= 1.8.3
57 BuildRequires:  libffi-devel
58 BuildRequires:  ncurses-devel
59 BuildRequires:  openssl-devel
60 BuildRequires:  pkgconfig
61 BuildRequires:  readline-devel >= 4.2
62 %{!?with_bootstrap:BuildRequires:       ruby-modules}
63 BuildRequires:  sed >= 4.0
64 BuildRequires:  yaml-devel
65 %if %{with tk}
66 BuildRequires:  tk-devel
67 %endif
68 Requires(post,postun):  /sbin/ldconfig
69 Provides:       ruby(ver) = %{ruby_ver}
70 Obsoletes:      rdoc
71 Obsoletes:      ruby-REXML
72 Obsoletes:      ruby-doc < 1.8.4
73 Obsoletes:      ruby-fastthread
74 %if %{with batteries}
75 Provides:       json = %{json_ver}
76 Provides:       rake = %{rake_ver}
77 Provides:       ruby-json = %{json_ver}
78 Provides:       ruby-rake = %{rake_ver}
79 Provides:       ruby-rubygems = %{rubygems_ver}
80 Provides:       rubygems = %{rubygems_ver}
81 Obsoletes:      ruby-json
82 Obsoletes:      ruby-rake
83 Obsoletes:      ruby-rubygems
84 %endif
85 Conflicts:      ruby-activesupport < 2.3.11-2
86 Conflicts:      ruby-activesupport2 < 2.3.11-2
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 # bleh, some nasty (gcc or ruby) bug still not fixed
90 # (SEGV or "unexpected break" on miniruby run during build)
91 %define         specflags_ia64  -O0
92
93 # ruby needs frame pointers for correct exception handling
94 %define         specflags_ia32  -fno-omit-frame-pointer
95
96 %description
97 Ruby is the interpreted scripting language for quick and easy
98 object-oriented programming. It has many features to process text
99 files and to do system management tasks (as in Perl). It is simple,
100 straight-forward, extensible, and portable.
101
102 This package contains only shared library and ruby interpreter. To get
103 full-functional ruby environment install ruby-modules package.
104
105 %description -l ja.UTF-8
106 Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初
107 から純粋なオブジェクト指向言語として設計されていますから,オブジェクト
108 指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です.
109
110 %description -l pl.UTF-8
111 Ruby to interpretowany język skryptowy, w sam raz dla łatwego i
112 szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji
113 ułatwiających przetwarzanie plików tekstowych i wykonywanie prac
114 związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty,
115 rozszerzalny i przenośny.
116
117 Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby.
118 Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni
119 funkcjonalnego środowiska ruby.
120
121 %description -l pt_BR.UTF-8
122 Ruby é uma linguagem de script interpretada de programação orientada a
123 objeto. Possui diversas características para processamento de texto. É
124 simples, extensível e direta.
125
126 %package modules
127 Summary:        Ruby standard modules and utilities
128 Summary(pl.UTF-8):      Standardowe moduły i narzędzia dla języka Ruby
129 Group:          Development/Languages
130 Requires:       %{name} = %{epoch}:%{version}-%{release}
131 # workaround for autodep generator net getting version properly
132 Provides:       ruby(abi) = %{ruby_ver}
133 Provides:       ruby-modules(ver) = %{ruby_ver}
134 Obsoletes:      ruby-minitest
135
136 %description modules
137 Ruby standard modules and utilities:
138 - erb - Tiny eRuby
139 - rdoc - documentation tool for source code
140 - irb - interactive Ruby
141 - ri - Ruby interactive reference
142 - testrb - automatic runner for Test::Unit of Ruby
143
144 %description modules -l pl.UTF-8
145 Standardowe moduły i narzędzia Ruby:
146 - erb - mały eRuby
147 - rdoc - narzędzie do dokumentowania kodu źródłowego
148 - irb - interaktywny Ruby
149 - ri - interaktywna dokumentacja Ruby
150 - testrb - automatyczny runner dla Ruby Test::Unit
151
152 %package tk
153 Summary:        Ruby/Tk bindings
154 Summary(pl.UTF-8):      Wiązania Ruby/Tk
155 Group:          Development/Languages
156 Requires:       %{name}-modules = %{epoch}:%{version}-%{release}
157
158 %description tk
159 This pachage contains Ruby/Tk bindings.
160
161 %description tk -l pl.UTF-8
162 Ten pakiet zawiera wiązania Ruby/Tk.
163
164 %package devel
165 Summary:        Ruby development libraries
166 Summary(pl.UTF-8):      Biblioteki programistyczne interpretera języka Ruby
167 Group:          Development/Languages
168 Requires:       %{name}-modules = %{epoch}:%{version}-%{release}
169
170 %description devel
171 Ruby development libraries.
172
173 %description devel -l pl.UTF-8
174 Biblioteki programistyczne interpretera języka Ruby.
175
176 %package static
177 Summary:        Ruby static libraries
178 Summary(pl.UTF-8):      Biblioteki statyczne Ruby
179 Group:          Development/Languages
180 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
181
182 %description static
183 Ruby static libraries.
184
185 %description static -l pl.UTF-8
186 Biblioteki statyczne Ruby.
187
188 %package doc
189 Summary:        Ruby HTML documentation
190 Summary(pl.UTF-8):      Dokumentacja HTML do Ruby
191 Group:          Documentation
192
193 %description doc
194 Ruby HTML documentation: FAQ, guide, core and standard library.
195
196 %description doc -l pl.UTF-8
197 Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i
198 stdlib.
199
200 %package doc-ri
201 Summary:        Ruby ri documentation
202 Summary(pl.UTF-8):      Dokumentacja Ruby w formacie ri
203 Group:          Documentation
204 Requires:       %{name}-modules = %{epoch}:%{version}-%{release}
205
206 %description doc-ri
207 Ruby ri documentation.
208
209 %description doc-ri -l pl.UTF-8
210 Dokumentacja Ruby w formacie ri.
211
212 %package examples
213 Summary:        Ruby examples
214 Summary(pl.UTF-8):      Przykłady dla języka Ruby
215 Group:          Development/Languages
216
217 %description examples
218 Ruby examples.
219
220 %description examples -l pl.UTF-8
221 Przykłady programów w języku Ruby.
222
223 %prep
224 %if %{with bootstrap}
225 %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100
226 %else
227 %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3
228 %endif
229 %patch0 -p1
230 %patch1 -p1
231 %patch2 -p1
232
233 # must be regenerated with new bison
234 %{__rm} parse.{c,h}
235
236 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
237
238 find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \
239         -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \
240         | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,'
241
242 %build
243 cp -f /usr/share/automake/config.sub .
244
245 # build ruby-1.8.7 first
246 %if %{with bootstrap}
247 cd %{name}-1.8.7-p330
248 %configure
249 %{__make}
250 cd ..
251 %endif
252
253 %{__autoconf}
254 %configure \
255         %{?with_bootstrap:--with-baseruby=%{name}-1.8.7-p330/miniruby} \
256         --enable-shared \
257         --enable-pthread \
258         --with-ruby-version=minor
259
260 %{__make} -j1 \
261         COPY="cp -p" Q= \
262         %{?with_bootstrap:BASERUBY="ruby-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"}
263
264 %if %{with doc}
265 %{__make} -j1 rdoc
266 %endif
267
268 %install
269 rm -rf $RPM_BUILD_ROOT
270 install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \
271         $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/tasks
272
273 %{__make} install \
274         DESTDIR=$RPM_BUILD_ROOT
275
276 cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
277 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1
278 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1
279
280 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}/html
281
282 %if %{without batteries}
283 # packaged separately
284 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rubygems,rake,json,tasks}
285 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/*-linux*/json
286 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/%{ruby_ver}/{rake,rubygems,json}.rb
287 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake}
288 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake*
289 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_ver}/system/JSON
290 %endif
291
292 %clean
293 rm -rf $RPM_BUILD_ROOT
294
295 %post   -p /sbin/ldconfig
296 %postun -p /sbin/ldconfig
297
298 %files
299 %defattr(644,root,root,755)
300 %doc NEWS LEGAL README README.EXT ChangeLog ToDo
301 %attr(755,root,root) %{_bindir}/ruby
302 %if %{with batteries}
303 %attr(755,root,root) %{_bindir}/gem
304 %attr(755,root,root) %{_bindir}/rake
305 %endif
306 %attr(755,root,root) %{_libdir}/libruby.so.*.*.*
307 %attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9
308 %{_mandir}/man1/ruby.1*
309 %if %{with batteries}
310 %{_mandir}/man1/rake.1*
311 %endif
312 %dir %{_libdir}/%{name}
313 %dir %{_libdir}/%{name}/%{ruby_ver}
314 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*
315 %dir %{_libdir}/%{name}/site_ruby
316 %dir %{_libdir}/%{name}/site_ruby/%{ruby_ver}
317 %dir %{_libdir}/%{name}/site_ruby/%{ruby_ver}/*-linux*
318 %dir %{_libdir}/%{name}/vendor_ruby
319 %dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver}
320 %dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver}/*-linux*
321 %dir %{_datadir}/ri
322 %dir %{_datadir}/ri/%{ruby_ver}
323 %dir %{_datadir}/ri/%{ruby_ver}/system
324 %dir %{ruby_rdocdir}
325
326 %files devel
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_libdir}/libruby.so
329 %{_includedir}/%{name}-%{ruby_ver}
330 %{_pkgconfigdir}/ruby-%{ruby_ver}.pc
331
332 %files static
333 %defattr(644,root,root,755)
334 %{_libdir}/libruby-static.a
335
336 %if %{with tk}
337 %files tk
338 %defattr(644,root,root,755)
339 %{_libdir}/%{name}/%{ruby_ver}/tcltk.rb
340 %{_libdir}/%{name}/%{ruby_ver}/tk*.rb
341 %{_libdir}/%{name}/%{ruby_ver}/tk
342 %{_libdir}/%{name}/%{ruby_ver}/tkextlib
343 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/t*.so
344 %endif
345
346 %files modules
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_bindir}/erb
349 %attr(755,root,root) %{_bindir}/irb
350 %attr(755,root,root) %{_bindir}/rdoc
351 %attr(755,root,root) %{_bindir}/ri
352 %attr(755,root,root) %{_bindir}/testrb
353 %{_libdir}/%{name}/%{ruby_ver}/bigdecimal
354 %{_libdir}/%{name}/%{ruby_ver}/cgi
355 %{_libdir}/%{name}/%{ruby_ver}/date
356 %{_libdir}/%{name}/%{ruby_ver}/digest
357 %{_libdir}/%{name}/%{ruby_ver}/dl
358 %{_libdir}/%{name}/%{ruby_ver}/drb
359 %{_libdir}/%{name}/%{ruby_ver}/fiddle
360 %{_libdir}/%{name}/%{ruby_ver}/io
361 %{_libdir}/%{name}/%{ruby_ver}/irb
362 %{_libdir}/%{name}/%{ruby_ver}/matrix
363 %{_libdir}/%{name}/%{ruby_ver}/minitest
364 %{_libdir}/%{name}/%{ruby_ver}/net
365 %{_libdir}/%{name}/%{ruby_ver}/openssl
366 %{_libdir}/%{name}/%{ruby_ver}/optparse
367 %if %{with batteries}
368 %{_libdir}/%{name}/%{ruby_ver}/json
369 %{_libdir}/%{name}/%{ruby_ver}/rake
370 %{_libdir}/%{name}/%{ruby_ver}/rubygems
371 %dir %{_libdir}/%{name}/%{ruby_ver}/tasks
372 %endif
373 %{_libdir}/%{name}/%{ruby_ver}/psych
374 %{_libdir}/%{name}/%{ruby_ver}/racc
375 %{_libdir}/%{name}/%{ruby_ver}/rbconfig
376 %{_libdir}/%{name}/%{ruby_ver}/rdoc
377 %{_libdir}/%{name}/%{ruby_ver}/rexml
378 %{_libdir}/%{name}/%{ruby_ver}/rinda
379 %{_libdir}/%{name}/%{ruby_ver}/ripper
380 %{_libdir}/%{name}/%{ruby_ver}/rss
381 %{_libdir}/%{name}/%{ruby_ver}/shell
382 %{_libdir}/%{name}/%{ruby_ver}/syck
383 %{_libdir}/%{name}/%{ruby_ver}/test
384 %{_libdir}/%{name}/%{ruby_ver}/uri
385 %{_libdir}/%{name}/%{ruby_ver}/webrick
386 %{_libdir}/%{name}/%{ruby_ver}/xmlrpc
387 %{_libdir}/%{name}/%{ruby_ver}/yaml
388 %{_libdir}/%{name}/%{ruby_ver}/[A-Za-s]*.rb
389 %{_libdir}/%{name}/%{ruby_ver}/tempfile.rb
390 %{_libdir}/%{name}/%{ruby_ver}/thread.rb
391 %{_libdir}/%{name}/%{ruby_ver}/thwait.rb
392 %{_libdir}/%{name}/%{ruby_ver}/time.rb
393 %{_libdir}/%{name}/%{ruby_ver}/timeout.rb
394 %{_libdir}/%{name}/%{ruby_ver}/tmpdir.rb
395 %{_libdir}/%{name}/%{ruby_ver}/tracer.rb
396 %{_libdir}/%{name}/%{ruby_ver}/tsort.rb
397 %{_libdir}/%{name}/%{ruby_ver}/[u-z]*.rb
398 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/[a-s]*.so
399 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/[u-z]*.so
400 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest
401 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/digest/*.so
402 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/dl
403 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/dl/callback.so
404 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc
405 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/*.so
406 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans
407 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/enc/trans/*.so
408 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io
409 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/io/*.so
410 %if %{with batteries}
411 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json
412 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json/ext
413 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/json/ext/*.so
414 %endif
415 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn
416 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/mathn/*.so
417 %dir %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc
418 %attr(755,root,root) %{_libdir}/%{name}/%{ruby_ver}/*-linux*/racc/*.so
419 %{_libdir}/%{name}/%{ruby_ver}/*-linux*/rbconfig.rb
420 %dir %{_libdir}/%{name}/gems
421 %dir %{_libdir}/%{name}/gems/%{ruby_ver}
422 %dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems
423 %dir %{_libdir}/%{name}/gems/%{ruby_ver}/specifications
424 %{_libdir}/%{name}/gems/%{ruby_ver}/specifications/io-console-*.gemspec
425 %{_libdir}/%{name}/gems/%{ruby_ver}/specifications/bigdecimal-*.gemspec
426 %if %{with batteries}
427 %dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rake-%{rake_ver}
428 %dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rake-%{rake_ver}/bin
429 %attr(755,root,root) %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rake-%{rake_ver}/bin/rake
430 %dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}
431 %dir %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}/bin
432 %attr(755,root,root) %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}/bin/rdoc
433 %attr(755,root,root) %{_libdir}/%{name}/gems/%{ruby_ver}/gems/rdoc-%{rdoc_ver}/bin/ri
434 %{_libdir}/%{name}/gems/%{ruby_ver}/specifications/minitest-%{minitest_ver}.gemspec
435 %{_libdir}/%{name}/gems/%{ruby_ver}/specifications/rake-%{rake_ver}.gemspec
436 %{_libdir}/%{name}/gems/%{ruby_ver}/specifications/rdoc-%{rdoc_ver}.gemspec
437 %{_libdir}/%{name}/gems/%{ruby_ver}/specifications/json-%{json_ver}.gemspec
438 %endif
439 %{_mandir}/man1/erb.1*
440 %{_mandir}/man1/irb.1*
441 %{_mandir}/man1/rdoc.1*
442 %{_mandir}/man1/ri.1*
443 %{_mandir}/man1/testrb.1*
444
445 %files doc
446 %defattr(644,root,root,755)
447 %doc ruby-doc-bundle/*
448 %{?with_doc:%doc ruby_%{doc_version}_stdlib}
449 %{?with_doc:%doc ruby_%{doc_version}_core}
450
451 %if %{with doc}
452 %files doc-ri
453 %defattr(644,root,root,755)
454 %{_datadir}/ri/%{ruby_ver}/system/*
455 %endif
456
457 %files examples
458 %defattr(644,root,root,755)
459 %{_examplesdir}/%{name}-%{version}
This page took 0.055787 seconds and 3 git commands to generate.