]>
Commit | Line | Data |
---|---|---|
e99f31df | 1 | # |
198b2d1a | 2 | # TODO: |
198b2d1a JR |
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 | |
96c2e1a4 ER |
7 | # - drop emacs |
8 | #* Mon Jul 12 2010 Mohammed Morsi <mmorsi@redhat.com> - 1.8.7.299-3 | |
9 | #- updated packaged based on feedback (from mtasaka) | |
10 | #- added comments to all patches / sources | |
11 | #- obsoleted ruby-mode, as it's now provided by the emacs package itself | |
12 | #- readded missing documentation | |
13 | #- various small compatability/regression fixes | |
14 | #* Thu Jun 24 2010 Mohammed Morsi <mmorsi@redhat.com> - 1.8.7.299-1 | |
15 | #- integrate more of jmeyering's and mtaska's feedback | |
16 | #- removed emacs bits that are now shipped with the emacs package | |
17 | #- various patch and spec cleanup | |
18 | #- rebased to ruby 1.8.7 patch 299, removed patches no longer needed: | |
19 | # ruby-1.8.7-openssl-1.0.patch, ruby-1.8.7-rb_gc_guard_ptr-optimization.patch | |
20 | ||
198b2d1a | 21 | # |
2acc5f17 | 22 | # Conditional build: |
bc991d5a JB |
23 | %bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds |
24 | %bcond_without emacs # skip building package with ruby-mode for emacs | |
25 | %bcond_without tk # skip building package with Tk bindings | |
a530aef0 | 26 | %bcond_without batteries # Don't include rubygems, json or rake |
d78ec589 | 27 | %bcond_without verpath # LOAD_PATH with version number |
92ff5331 | 28 | %bcond_with bootstrap # build bootstrap version |
fa311386 | 29 | |
374c5b6e | 30 | %define ruby_ver 1.9 |
af4f9d38 | 31 | %define basever 1.9.3 |
fa311386 | 32 | %define patchlevel 392 |
ee1a9db5 | 33 | %define doc_version 1_9_3 |
fa311386 | 34 | %define json_ver 1.5.5 |
fc97a6ea JR |
35 | %define rake_ver 0.9.2.2 |
36 | %define rubygems_ver 1.8.11 | |
37 | %define minitest_ver 2.5.1 | |
fa311386 | 38 | %define rdoc_ver 3.9.5 |
6e2f9b3c | 39 | Summary: Ruby - interpreted scripting language |
3c3949cf ER |
40 | Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ |
41 | Summary(pl.UTF-8): Ruby - interpretowany język skryptowy | |
42 | Summary(pt_BR.UTF-8): Linguagem de script orientada a objeto | |
43 | Summary(zh_CN.UTF-8): ruby - 一种快速高效的面向对象脚本编程语言 | |
4ab119cd | 44 | Name: ruby |
6cd63ddf | 45 | Version: %{basever}.%{patchlevel} |
d78ec589 | 46 | Release: 0.1 |
01204e8f | 47 | Epoch: 1 |
0a23e00f | 48 | License: The Ruby License |
6eb17ef6 | 49 | Group: Development/Languages |
d78ec589 | 50 | Source0: ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_ver}/%{name}-%{basever}-p%{patchlevel}.tar.bz2 |
775b0723 | 51 | # Source0-md5: a810d64e2255179d2f334eb61fb8519c |
ef29702a | 52 | Source1: http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz |
775b0723 | 53 | # Source1-md5: ad1af0043be98ba1a4f6d0185df63876 |
af4f9d38 | 54 | Source2: http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz |
775b0723 | 55 | # Source2-md5: ec622612428672c432b6f65dd31a84b5 |
af4f9d38 | 56 | Source3: http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_core_rdocs.tgz |
775b0723 | 57 | # Source3-md5: 1892aadde51d36106c513bced2193dff |
92ff5331 | 58 | Source100: ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.7-p330.tar.gz |
59 | # Source100-md5: 50a49edb787211598d08e756e733e42e | |
af4f9d38 | 60 | Source4: rdoc.1 |
af4f9d38 JR |
61 | Source5: testrb.1 |
62 | Source6: %{name}-mode-init.el | |
fc97a6ea JR |
63 | Patch0: %{name}-lib64.patch |
64 | Patch1: %{name}-ffs.patch | |
360c41c0 | 65 | Patch2: fix-bison-invocation.patch |
d78ec589 ER |
66 | # http://redmine.ruby-lang.org/issues/5231 |
67 | Patch3: disable-versioned-paths.patch | |
68 | # TODO: Should be submitted upstream? | |
69 | Patch4: arch-specific-dir.patch | |
70 | # http://redmine.ruby-lang.org/issues/5281 | |
71 | Patch5: site-and-vendor-arch-flags.patch | |
7c36cd5d | 72 | URL: http://www.ruby-lang.org/ |
19b741fe | 73 | BuildRequires: autoconf >= 2.60 |
53c95475 | 74 | BuildRequires: automake |
cc4f6b84 | 75 | BuildRequires: bison |
f0eb2dd9 | 76 | BuildRequires: db-devel |
e99f31df | 77 | %{?with_emacs:BuildRequires: emacs} |
e9f2c6fe | 78 | BuildRequires: gdbm-devel >= 1.8.3 |
9ae7df75 | 79 | BuildRequires: libffi-devel |
1968db6d | 80 | BuildRequires: ncurses-devel |
f33fb184 | 81 | BuildRequires: openssl-devel |
74c8af09 | 82 | BuildRequires: pkgconfig |
933aeb0e | 83 | BuildRequires: readline-devel >= 4.2 |
92ff5331 | 84 | %{!?with_bootstrap:BuildRequires: ruby-modules} |
7911cce0 | 85 | BuildRequires: sed >= 4.0 |
92ff5331 | 86 | BuildRequires: yaml-devel |
15ecb21e | 87 | %if %{with tk} |
e14a2f74 | 88 | BuildRequires: tk-devel |
15ecb21e | 89 | %endif |
f0eb2dd9 | 90 | Requires(post,postun): /sbin/ldconfig |
68ec864f | 91 | Provides: ruby(ver) = %{ruby_ver} |
ecce1c8a | 92 | Obsoletes: rdoc |
e14a2f74 | 93 | Obsoletes: ruby-REXML |
bb5582fa | 94 | Obsoletes: ruby-doc < 1.8.4 |
1be6ffc9 | 95 | Obsoletes: ruby-fastthread |
ada7d096 | 96 | %if %{with batteries} |
c4ef2b1c JR |
97 | Provides: json = %{json_ver} |
98 | Provides: rake = %{rake_ver} | |
fc97a6ea | 99 | Provides: ruby-json = %{json_ver} |
bc991d5a | 100 | Provides: ruby-rake = %{rake_ver} |
fc97a6ea | 101 | Provides: ruby-rubygems = %{rubygems_ver} |
d78ec589 | 102 | Provides: rubygems = %{rubygems_ver} |
ada7d096 JB |
103 | Obsoletes: ruby-json |
104 | Obsoletes: ruby-rake | |
105 | Obsoletes: ruby-rubygems | |
106 | %endif | |
a2963aa1 JR |
107 | Conflicts: ruby-activesupport < 2.3.11-2 |
108 | Conflicts: ruby-activesupport2 < 2.3.11-2 | |
584b8bcb | 109 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4ab119cd | 110 | |
d78ec589 | 111 | %define gem_dir %{_datadir}/%{name}/gems/%{ruby_version} |
d78ec589 ER |
112 | |
113 | # The RubyGems library has to stay out of Ruby directory three, since the | |
114 | # RubyGems should be share by all Ruby implementations. | |
115 | %define rubygems_dir %{_datadir}/rubygems | |
d78ec589 | 116 | |
989b4296 | 117 | %define ruby_libdir %{_datadir}/%{name} |
d78ec589 ER |
118 | %define ruby_libarchdir %{_libdir}/%{name} |
119 | ||
120 | # This is the local lib/arch and should not be used for packaging. | |
121 | %define ruby_sitedir site_ruby | |
989b4296 ER |
122 | %define ruby_sitelibdir %{_prefix}/local/share/%{name}/%{ruby_sitedir} |
123 | %define ruby_sitearchdir %{_prefix}/local/%{_lib}/%{name}/%{ruby_sitedir} | |
d78ec589 ER |
124 | |
125 | # This is the general location for libs/archs compatible with all | |
126 | # or most of the Ruby versions available in the PLD repositories. | |
127 | %define ruby_vendordir vendor_ruby | |
989b4296 ER |
128 | %define ruby_vendorlibdir %{_datadir}/%{name}/%{ruby_vendordir} |
129 | %define ruby_vendorarchdir %{_libdir}/%{name}/%{ruby_vendordir} | |
d78ec589 ER |
130 | |
131 | # TODO: drop legacy loadpaths after all ruby modules rebuilt in Th | |
132 | %define legacy_libdir %{_libdir}/%{name}/%{ruby_version} | |
133 | %define legacy_archdir %{_libdir}/%{name}/%{ruby_version}/%{_arch}-linux | |
134 | %define legacy_sitedir %{_libdir}/%{name}/%{ruby_sitedir} | |
135 | %define legacy_sitelibdir %{_libdir}/%{name}/%{ruby_sitedir}/%{ruby_version} | |
136 | %define legacy_sitearchdir %{_libdir}/%{name}/%{ruby_sitedir}/%{ruby_version}/%{_arch}-linux | |
137 | %define legacy_vendordir %{_libdir}/%{name}/%{ruby_vendordir} | |
138 | %define legacy_vendorlibdir %{_libdir}/%{name}/%{ruby_vendordir}/%{ruby_version} | |
139 | %define legacy_vendorarchdir %{_libdir}/%{name}/%{ruby_vendordir}/%{ruby_version}/%{_arch}-linux | |
140 | ||
141 | %define legacy_siteloadpath %{legacy_sitelibdir}:%{legacy_sitearchdir}:%{legacy_sitedir} | |
142 | %define legacy_vendorloadpath %{legacy_vendorlibdir}:%{legacy_vendorarchdir}:%{legacy_vendordir} | |
143 | %define legacy_loadpath %{legacy_libdir}:%{legacy_archdir} | |
144 | %define legacy_loadpaths %{legacy_siteloadpath}:%{legacy_vendorloadpath}:%{legacy_loadpath} | |
145 | ||
8ea447c1 | 146 | # bleh, some nasty (gcc or ruby) bug still not fixed |
cc2dcaa2 | 147 | # (SEGV or "unexpected break" on miniruby run during build) |
8ea447c1 JB |
148 | %define specflags_ia64 -O0 |
149 | ||
88546731 | 150 | # ruby needs frame pointers for correct exception handling |
b66203d6 | 151 | %define specflags_ia32 -fno-omit-frame-pointer |
88546731 | 152 | |
4ab119cd | 153 | %description |
154 | Ruby is the interpreted scripting language for quick and easy | |
155 | object-oriented programming. It has many features to process text | |
156 | files and to do system management tasks (as in Perl). It is simple, | |
157 | straight-forward, extensible, and portable. | |
158 | ||
9fd96af7 | 159 | This package contains only shared library and ruby interpreter. To get |
160 | full-functional ruby environment install ruby-modules package. | |
161 | ||
a0a47c48 JR |
162 | %description -l ja.UTF-8 |
163 | Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初 | |
164 | から純粋なオブジェクト指向言語として設計されていますから,オブジェクト | |
15467dc7 | 165 | 指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です. |
7c36cd5d | 166 | |
a0a47c48 JR |
167 | %description -l pl.UTF-8 |
168 | Ruby to interpretowany język skryptowy, w sam raz dla łatwego i | |
169 | szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji | |
170 | ułatwiających przetwarzanie plików tekstowych i wykonywanie prac | |
171 | związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty, | |
172 | rozszerzalny i przenośny. | |
6e2f9b3c | 173 | |
a0a47c48 JR |
174 | Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby. |
175 | Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni | |
176 | funkcjonalnego środowiska ruby. | |
9fd96af7 | 177 | |
a0a47c48 JR |
178 | %description -l pt_BR.UTF-8 |
179 | Ruby é uma linguagem de script interpretada de programação orientada a | |
180 | objeto. Possui diversas características para processamento de texto. É | |
181 | simples, extensível e direta. | |
7c36cd5d | 182 | |
9fd96af7 | 183 | %package modules |
184 | Summary: Ruby standard modules and utilities | |
3c3949cf | 185 | Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby |
9fd96af7 | 186 | Group: Development/Languages |
187 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
56ca5a3b JR |
188 | # workaround for autodep generator net getting version properly |
189 | Provides: ruby(abi) = %{ruby_ver} | |
68ec864f | 190 | Provides: ruby-modules(ver) = %{ruby_ver} |
816fcc98 | 191 | Obsoletes: ruby-minitest |
9fd96af7 | 192 | |
193 | %description modules | |
194 | Ruby standard modules and utilities: | |
195 | - erb - Tiny eRuby | |
196 | - rdoc - documentation tool for source code | |
197 | - irb - interactive Ruby | |
198 | - ri - Ruby interactive reference | |
7911cce0 | 199 | - testrb - automatic runner for Test::Unit of Ruby |
9fd96af7 | 200 | |
a0a47c48 JR |
201 | %description modules -l pl.UTF-8 |
202 | Standardowe moduły i narzędzia Ruby: | |
203 | - erb - mały eRuby | |
204 | - rdoc - narzędzie do dokumentowania kodu źródłowego | |
9fd96af7 | 205 | - irb - interaktywny Ruby |
206 | - ri - interaktywna dokumentacja Ruby | |
7911cce0 | 207 | - testrb - automatyczny runner dla Ruby Test::Unit |
9fd96af7 | 208 | |
265d0efe | 209 | %package tk |
210 | Summary: Ruby/Tk bindings | |
3c3949cf | 211 | Summary(pl.UTF-8): Wiązania Ruby/Tk |
e65aac33 | 212 | Group: Development/Languages |
69b51dc9 | 213 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} |
265d0efe | 214 | |
215 | %description tk | |
e65aac33 | 216 | This pachage contains Ruby/Tk bindings. |
217 | ||
a0a47c48 JR |
218 | %description tk -l pl.UTF-8 |
219 | Ten pakiet zawiera wiązania Ruby/Tk. | |
265d0efe | 220 | |
e14a2f74 | 221 | %package devel |
e14a2f74 | 222 | Summary: Ruby development libraries |
3c3949cf | 223 | Summary(pl.UTF-8): Biblioteki programistyczne interpretera języka Ruby |
9434194f | 224 | Group: Development/Languages |
9fd96af7 | 225 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} |
e14a2f74 | 226 | |
227 | %description devel | |
9434194f JB |
228 | Ruby development libraries. |
229 | ||
a0a47c48 JR |
230 | %description devel -l pl.UTF-8 |
231 | Biblioteki programistyczne interpretera języka Ruby. | |
e14a2f74 | 232 | |
87b9c30a | 233 | %package static |
234 | Summary: Ruby static libraries | |
3c3949cf | 235 | Summary(pl.UTF-8): Biblioteki statyczne Ruby |
87b9c30a | 236 | Group: Development/Languages |
f89d855e | 237 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
87b9c30a | 238 | |
239 | %description static | |
240 | Ruby static libraries. | |
241 | ||
a0a47c48 | 242 | %description static -l pl.UTF-8 |
87b9c30a | 243 | Biblioteki statyczne Ruby. |
244 | ||
754b419a | 245 | %package doc |
9fd96af7 | 246 | Summary: Ruby HTML documentation |
3c3949cf | 247 | Summary(pl.UTF-8): Dokumentacja HTML do Ruby |
9fd96af7 | 248 | Group: Documentation |
249 | ||
250 | %description doc | |
251 | Ruby HTML documentation: FAQ, guide, core and standard library. | |
252 | ||
a0a47c48 | 253 | %description doc -l pl.UTF-8 |
d99a4382 | 254 | Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i |
255 | stdlib. | |
69b51dc9 | 256 | |
9fd96af7 | 257 | %package doc-ri |
258 | Summary: Ruby ri documentation | |
3c3949cf | 259 | Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri |
9fd96af7 | 260 | Group: Documentation |
69b51dc9 | 261 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} |
9fd96af7 | 262 | |
263 | %description doc-ri | |
264 | Ruby ri documentation. | |
265 | ||
a0a47c48 | 266 | %description doc-ri -l pl.UTF-8 |
9fd96af7 | 267 | Dokumentacja Ruby w formacie ri. |
268 | ||
269 | %package examples | |
270 | Summary: Ruby examples | |
3c3949cf | 271 | Summary(pl.UTF-8): Przykłady dla języka Ruby |
9fd96af7 | 272 | Group: Development/Languages |
273 | ||
274 | %description examples | |
275 | Ruby examples. | |
276 | ||
a0a47c48 JR |
277 | %description examples -l pl.UTF-8 |
278 | Przykłady programów w języku Ruby. | |
9fd96af7 | 279 | |
e99f31df | 280 | %package emacs-mode |
281 | Summary: Ruby mode and debugger for Emacs | |
3c3949cf | 282 | Summary(pl.UTF-8): Tryb Ruby i debugger dla Emacsa |
2acc5f17 JB |
283 | Group: Development/Tools |
284 | Requires: %{name}-modules = %{epoch}:%{version}-%{release} | |
e99f31df | 285 | Requires: emacs-common |
e99f31df | 286 | |
287 | %description emacs-mode | |
288 | Ruby mode and debugger for Emacs. | |
289 | ||
a0a47c48 | 290 | %description emacs-mode -l pl.UTF-8 |
e99f31df | 291 | Tryb Ruby i debugger dla Emacsa. |
292 | ||
4ab119cd | 293 | %prep |
360c41c0 | 294 | %if %{with bootstrap} |
af4f9d38 | 295 | %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100 |
360c41c0 JR |
296 | %else |
297 | %setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 | |
298 | %endif | |
933aeb0e | 299 | %patch0 -p1 |
a310037a | 300 | %patch1 -p1 |
360c41c0 | 301 | %patch2 -p1 |
d78ec589 ER |
302 | %patch3 -p1 |
303 | %patch4 -p1 | |
304 | %patch5 -p1 | |
360c41c0 JR |
305 | |
306 | # must be regenerated with new bison | |
307 | %{__rm} parse.{c,h} | |
4ab119cd | 308 | |
b2f04116 JR |
309 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f |
310 | ||
311 | find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ | |
312 | -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \ | |
bb5582fa | 313 | | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,' |
e7754311 | 314 | |
4ab119cd | 315 | %build |
8ea447c1 | 316 | cp -f /usr/share/automake/config.sub . |
a5f9b7ff | 317 | |
92ff5331 | 318 | # build ruby-1.8.7 first |
319 | %if %{with bootstrap} | |
320 | cd %{name}-1.8.7-p330 | |
321 | %configure | |
322 | %{__make} | |
323 | cd .. | |
324 | %endif | |
325 | ||
8ea447c1 | 326 | %{__autoconf} |
ecde9c47 | 327 | %configure \ |
92ff5331 | 328 | %{?with_bootstrap:--with-baseruby=%{name}-1.8.7-p330/miniruby} \ |
d78ec589 ER |
329 | --with-rubylibprefix=%{ruby_libdir} \ |
330 | --with-archdir=%{ruby_libarchdir} \ | |
331 | --with-sitedir=%{ruby_sitelibdir} \ | |
332 | --with-sitearchdir=%{ruby_sitearchdir} \ | |
333 | --with-vendordir=%{ruby_vendorlibdir} \ | |
334 | --with-vendorarchdir=%{ruby_vendorarchdir} \ | |
335 | --with-rubygemsdir=%{rubygems_dir} \ | |
336 | --with-search-path=%{legacy_loadpaths} \ | |
3a4dd1f6 | 337 | --enable-shared \ |
374c5b6e | 338 | --enable-pthread \ |
96c2e1a4 | 339 | --disable-install-doc \ |
d78ec589 | 340 | %{!?with_verpath:--disable-versioned-paths} \ |
15467dc7 | 341 | --with-ruby-version=minor |
4ab119cd | 342 | |
dbf8f91d | 343 | %{__make} -j1 main \ |
d78ec589 ER |
344 | COPY="cp -p" Q= \ |
345 | %{?with_bootstrap:BASERUBY="ruby-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"} | |
aa58dbf5 | 346 | |
d0f5536d | 347 | %if %{with doc} |
dbf8f91d | 348 | %{__make} -j1 docs |
d0f5536d | 349 | %endif |
53830491 | 350 | |
4ab119cd | 351 | %install |
352 | rm -rf $RPM_BUILD_ROOT | |
fc97a6ea | 353 | install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \ |
aaf7ed9e | 354 | $RPM_BUILD_ROOT%{ruby_libdir}/%{ruby_version}/tasks |
1968db6d | 355 | |
96c2e1a4 | 356 | %{__make} install %{?with_doc:install-doc} \ |
ecde9c47 | 357 | DESTDIR=$RPM_BUILD_ROOT |
d041de24 | 358 | |
9fd96af7 | 359 | cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d78ec589 ER |
360 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1 |
361 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1 | |
18e966a7 | 362 | |
15467dc7 | 363 | %if %{without batteries} |
b2f04116 | 364 | # packaged separately |
aaf7ed9e | 365 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/%{ruby_version}/{rubygems,rake,json,tasks} |
d78ec589 | 366 | %{__rm} -r $RPM_BUILD_ROOT%{ruby_libarchdir}/json |
aaf7ed9e | 367 | %{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/%{ruby_version}/{rake,rubygems,json}.rb |
92ff5331 | 368 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake} |
369 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake* | |
370 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_ver}/system/JSON | |
15467dc7 | 371 | %endif |
1968db6d | 372 | |
e99f31df | 373 | # ruby emacs mode - borrowed from FC-4 |
374 | %if %{with emacs} | |
a563469d | 375 | install -d $RPM_BUILD_ROOT%{_emacs_lispdir}/{%{name}-mode,site-start.d} |
2524363b | 376 | cp -a misc/*.el $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode |
92ff5331 | 377 | %{__rm} $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el* |
af4f9d38 | 378 | install -p %{SOURCE6} $RPM_BUILD_ROOT%{_emacs_lispdir}/site-start.d |
b4ca71cd | 379 | cat << 'EOF' > path.el |
e99f31df | 380 | (setq load-path (cons "." load-path) byte-compile-warnings nil) |
381 | EOF | |
382 | emacs --no-site-file -q -batch -l path.el -f batch-byte-compile $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/*.el | |
92ff5331 | 383 | %{__rm} path.el* |
e99f31df | 384 | %endif |
385 | ||
d78ec589 ER |
386 | # too much .ri |
387 | rm -rf $RPM_BUILD_ROOT%{_datadir}/ri | |
388 | rm -rf $RPM_BUILD_ROOT%{_docdir}/ruby/html | |
96c2e1a4 | 389 | #rm -rf $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode |
d78ec589 | 390 | |
4ab119cd | 391 | %clean |
392 | rm -rf $RPM_BUILD_ROOT | |
393 | ||
d041de24 JR |
394 | %post -p /sbin/ldconfig |
395 | %postun -p /sbin/ldconfig | |
4ab119cd | 396 | |
397 | %files | |
398 | %defattr(644,root,root,755) | |
b2f04116 | 399 | %doc NEWS LEGAL README README.EXT ChangeLog ToDo |
9fd96af7 | 400 | %attr(755,root,root) %{_bindir}/ruby |
15467dc7 | 401 | %if %{with batteries} |
402 | %attr(755,root,root) %{_bindir}/gem | |
403 | %attr(755,root,root) %{_bindir}/rake | |
404 | %endif | |
529ff870 | 405 | %attr(755,root,root) %{_libdir}/libruby.so.*.*.* |
b2f04116 | 406 | %attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9 |
9fd96af7 | 407 | %{_mandir}/man1/ruby.1* |
15467dc7 | 408 | %if %{with batteries} |
409 | %{_mandir}/man1/rake.1* | |
410 | %endif | |
d78ec589 ER |
411 | #%dir %{_libdir}/%{name} |
412 | #%dir %{_libdir}/%{name}/%{ruby_ver} | |
413 | #%dir %{ruby_libarchdir} | |
414 | #%dir %{_libdir}/%{name}/site_ruby | |
415 | #%dir %{_libdir}/%{name}/site_ruby/%{ruby_ver} | |
416 | #%dir %{_libdir}/%{name}/site_ruby/%{ruby_ver}/*-linux* | |
417 | #%dir %{_libdir}/%{name}/vendor_ruby | |
418 | #%dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver} | |
419 | #%dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver}/*-linux* | |
420 | #%dir %{_datadir}/ri | |
421 | #%dir %{_datadir}/ri/%{ruby_ver} | |
422 | #%dir %{_datadir}/ri/%{ruby_ver}/system | |
a43d66d8 | 423 | %dir %{ruby_rdocdir} |
9fd96af7 | 424 | |
425 | %files devel | |
426 | %defattr(644,root,root,755) | |
529ff870 | 427 | %attr(755,root,root) %{_libdir}/libruby.so |
b2f04116 | 428 | %{_includedir}/%{name}-%{ruby_ver} |
fc97a6ea | 429 | %{_pkgconfigdir}/ruby-%{ruby_ver}.pc |
9fd96af7 | 430 | |
431 | %files static | |
432 | %defattr(644,root,root,755) | |
529ff870 | 433 | %{_libdir}/libruby-static.a |
9fd96af7 | 434 | |
15ecb21e | 435 | %if %{with tk} |
9fd96af7 | 436 | %files tk |
437 | %defattr(644,root,root,755) | |
aaf7ed9e ER |
438 | %{ruby_libdir}/%{ruby_version}/tcltk.rb |
439 | %{ruby_libdir}/%{ruby_version}/tk*.rb | |
440 | %{ruby_libdir}/%{ruby_version}/tk | |
441 | %{ruby_libdir}/%{ruby_version}/tkextlib | |
d78ec589 | 442 | %attr(755,root,root) %{ruby_libarchdir}/t*.so |
15ecb21e | 443 | %endif |
9fd96af7 | 444 | |
445 | %files modules | |
446 | %defattr(644,root,root,755) | |
447 | %attr(755,root,root) %{_bindir}/erb | |
448 | %attr(755,root,root) %{_bindir}/irb | |
449 | %attr(755,root,root) %{_bindir}/rdoc | |
450 | %attr(755,root,root) %{_bindir}/ri | |
451 | %attr(755,root,root) %{_bindir}/testrb | |
aaf7ed9e ER |
452 | %{ruby_libdir}/%{ruby_version}/bigdecimal |
453 | %{ruby_libdir}/%{ruby_version}/cgi | |
454 | %{ruby_libdir}/%{ruby_version}/date | |
455 | %{ruby_libdir}/%{ruby_version}/digest | |
456 | %{ruby_libdir}/%{ruby_version}/dl | |
457 | %{ruby_libdir}/%{ruby_version}/drb | |
458 | %{ruby_libdir}/%{ruby_version}/fiddle | |
459 | %{ruby_libdir}/%{ruby_version}/io | |
460 | %{ruby_libdir}/%{ruby_version}/irb | |
461 | %{ruby_libdir}/%{ruby_version}/matrix | |
462 | %{ruby_libdir}/%{ruby_version}/minitest | |
463 | %{ruby_libdir}/%{ruby_version}/net | |
464 | %{ruby_libdir}/%{ruby_version}/openssl | |
465 | %{ruby_libdir}/%{ruby_version}/optparse | |
15467dc7 | 466 | %if %{with batteries} |
aaf7ed9e ER |
467 | %{ruby_libdir}/%{ruby_version}/json |
468 | %{ruby_libdir}/%{ruby_version}/rake | |
469 | %{ruby_libdir}/%{ruby_version}/rubygems | |
dbf8f91d | 470 | %dir %{ruby_libdir}/%{ruby_version}/tasks |
15467dc7 | 471 | %endif |
aaf7ed9e ER |
472 | %{ruby_libdir}/%{ruby_version}/psych |
473 | %{ruby_libdir}/%{ruby_version}/racc | |
474 | %{ruby_libdir}/%{ruby_version}/rbconfig | |
475 | %{ruby_libdir}/%{ruby_version}/rdoc | |
476 | %{ruby_libdir}/%{ruby_version}/rexml | |
477 | %{ruby_libdir}/%{ruby_version}/rinda | |
478 | %{ruby_libdir}/%{ruby_version}/ripper | |
479 | %{ruby_libdir}/%{ruby_version}/rss | |
480 | %{ruby_libdir}/%{ruby_version}/shell | |
481 | %{ruby_libdir}/%{ruby_version}/syck | |
482 | %{ruby_libdir}/%{ruby_version}/test | |
483 | %{ruby_libdir}/%{ruby_version}/uri | |
484 | %{ruby_libdir}/%{ruby_version}/webrick | |
485 | %{ruby_libdir}/%{ruby_version}/xmlrpc | |
486 | %{ruby_libdir}/%{ruby_version}/yaml | |
487 | %{ruby_libdir}/%{ruby_version}/[A-Za-s]*.rb | |
488 | %{ruby_libdir}/%{ruby_version}/tempfile.rb | |
489 | %{ruby_libdir}/%{ruby_version}/thread.rb | |
490 | %{ruby_libdir}/%{ruby_version}/thwait.rb | |
491 | %{ruby_libdir}/%{ruby_version}/time.rb | |
492 | %{ruby_libdir}/%{ruby_version}/timeout.rb | |
493 | %{ruby_libdir}/%{ruby_version}/tmpdir.rb | |
494 | %{ruby_libdir}/%{ruby_version}/tracer.rb | |
495 | %{ruby_libdir}/%{ruby_version}/tsort.rb | |
496 | %{ruby_libdir}/%{ruby_version}/[u-z]*.rb | |
d78ec589 ER |
497 | %attr(755,root,root) %{ruby_libarchdir}/[a-s]*.so |
498 | %attr(755,root,root) %{ruby_libarchdir}/[u-z]*.so | |
499 | %dir %{ruby_libarchdir}/digest | |
500 | %attr(755,root,root) %{ruby_libarchdir}/digest/*.so | |
501 | %dir %{ruby_libarchdir}/dl | |
502 | %attr(755,root,root) %{ruby_libarchdir}/dl/callback.so | |
503 | %dir %{ruby_libarchdir}/enc | |
504 | %attr(755,root,root) %{ruby_libarchdir}/enc/*.so | |
505 | %dir %{ruby_libarchdir}/enc/trans | |
506 | %attr(755,root,root) %{ruby_libarchdir}/enc/trans/*.so | |
507 | %dir %{ruby_libarchdir}/io | |
508 | %attr(755,root,root) %{ruby_libarchdir}/io/*.so | |
15467dc7 | 509 | %if %{with batteries} |
d78ec589 ER |
510 | %dir %{ruby_libarchdir}/json |
511 | %dir %{ruby_libarchdir}/json/ext | |
512 | %attr(755,root,root) %{ruby_libarchdir}/json/ext/*.so | |
15467dc7 | 513 | %endif |
d78ec589 ER |
514 | %dir %{ruby_libarchdir}/mathn |
515 | %attr(755,root,root) %{ruby_libarchdir}/mathn/*.so | |
516 | %dir %{ruby_libarchdir}/racc | |
517 | %attr(755,root,root) %{ruby_libarchdir}/racc/*.so | |
518 | %{ruby_libarchdir}/rbconfig.rb | |
96c2e1a4 | 519 | #%dir %{ruby_libdir}/%{ruby_version}/gems |
dbf8f91d | 520 | %dir %{_datadir}/%{name}/gems |
d78ec589 | 521 | %dir %{gem_dir} |
d78ec589 ER |
522 | %dir %{gem_dir}/specifications |
523 | %{gem_dir}/specifications/io-console-*.gemspec | |
524 | %{gem_dir}/specifications/bigdecimal-*.gemspec | |
9a8b7dca | 525 | %if %{with batteries} |
dbf8f91d ER |
526 | %dir %{gem_dir}/gems/rake-%{rake_ver} |
527 | %dir %{gem_dir}/gems/rake-%{rake_ver}/bin | |
528 | %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake | |
529 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver} | |
530 | %dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin | |
531 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc | |
532 | %attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri | |
d78ec589 ER |
533 | %{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec |
534 | %{gem_dir}/specifications/rake-%{rake_ver}.gemspec | |
535 | %{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec | |
536 | %{gem_dir}/specifications/json-%{json_ver}.gemspec | |
9a8b7dca | 537 | %endif |
9fd96af7 | 538 | %{_mandir}/man1/erb.1* |
539 | %{_mandir}/man1/irb.1* | |
540 | %{_mandir}/man1/rdoc.1* | |
541 | %{_mandir}/man1/ri.1* | |
542 | %{_mandir}/man1/testrb.1* | |
15467dc7 | 543 | |
9fd96af7 | 544 | %files doc |
9434194f | 545 | %defattr(644,root,root,755) |
b2f04116 | 546 | %doc ruby-doc-bundle/* |
af4f9d38 JR |
547 | %{?with_doc:%doc ruby_%{doc_version}_stdlib} |
548 | %{?with_doc:%doc ruby_%{doc_version}_core} | |
87b9c30a | 549 | |
d0f5536d | 550 | %if %{with doc} |
9fd96af7 | 551 | %files doc-ri |
e40bfe06 | 552 | %defattr(644,root,root,755) |
68ec864f | 553 | %{_datadir}/ri/%{ruby_ver}/system/* |
d0f5536d | 554 | %endif |
265d0efe | 555 | |
9fd96af7 | 556 | %files examples |
616a12d8 | 557 | %defattr(644,root,root,755) |
9fd96af7 | 558 | %{_examplesdir}/%{name}-%{version} |
e99f31df | 559 | |
560 | %if %{with emacs} | |
561 | %files emacs-mode | |
562 | %defattr(644,root,root,755) | |
4b6581fc | 563 | %doc misc/* |
e99f31df | 564 | %dir %{_emacs_lispdir}/%{name}-mode |
4b6581fc | 565 | %{_emacs_lispdir}/%{name}-mode/*.elc |
566 | %{_emacs_lispdir}/site-start.d/*.el | |
e99f31df | 567 | %endif |