1 |
fwang |
289958 |
%define subver 1.9 |
2 |
fwang |
290007 |
%define rubyapi 1.9.1 |
3 |
fwang |
289958 |
%define rubyver 1.9.3 |
4 |
|
|
%define patchversion p194 |
5 |
fwang |
291557 |
%define rel 3 |
6 |
blino |
1152 |
|
7 |
fwang |
291557 |
%define ruby_libdir %{_datadir}/%{name} |
8 |
|
|
%define ruby_libarchdir %{_libdir}/%{name} |
9 |
|
|
|
10 |
fwang |
290007 |
# This is the local lib/arch and should not be used for packaging. |
11 |
fwang |
291557 |
%define ruby_sitelibdir %{_datadir}/ruby/site_ruby |
12 |
|
|
%define ruby_sitearchdir %{_libdir}/ruby/site_ruby |
13 |
fwang |
290007 |
|
14 |
|
|
# This is the general location for libs/archs compatible with all |
15 |
|
|
# or most of the Ruby versions available in the Fedora repositories. |
16 |
fwang |
291551 |
%define ruby_vendorlibdir %{_datadir}/ruby/vendor_ruby |
17 |
fwang |
291557 |
%define ruby_vendorarchdir %{_libdir}/ruby/vendor_ruby |
18 |
fwang |
290007 |
|
19 |
|
|
# The RubyGems library has to stay out of Ruby directory three, since the |
20 |
|
|
# RubyGems should be share by all Ruby implementations. |
21 |
fwang |
291557 |
%define rubygems_dir %{_datadir}/ruby/gems |
22 |
fwang |
290007 |
|
23 |
blino |
1152 |
Summary: Object Oriented Script Language |
24 |
|
|
Name: ruby |
25 |
|
|
Version: %{rubyver}.%{patchversion} |
26 |
|
|
Release: %mkrel %rel |
27 |
|
|
License: Ruby or GPLv2 |
28 |
|
|
Group: Development/Ruby |
29 |
|
|
BuildRequires: autoconf |
30 |
|
|
BuildRequires: byacc |
31 |
|
|
BuildRequires: ncurses-devel |
32 |
|
|
BuildRequires: readline-devel |
33 |
|
|
BuildRequires: tcl-devel tk-devel |
34 |
fwang |
276350 |
BuildRequires: db-devel |
35 |
fwang |
176940 |
BuildRequires: gdbm-devel >= 1.8.3 |
36 |
blino |
1152 |
BuildRequires: openssl-devel |
37 |
|
|
BuildRequires: zlib-devel |
38 |
fwang |
289987 |
BuildRequires: libffi-devel |
39 |
|
|
BuildRequires: yaml-devel |
40 |
fwang |
289998 |
BuildRequires: rpm-mageia-setup >= 1.158 |
41 |
blino |
1152 |
Obsoletes: ruby-rexml |
42 |
|
|
Provides: ruby-rexml |
43 |
|
|
# explicit file provides (since such requires are automatically added by find-requires) |
44 |
|
|
Provides: /usr/bin/ruby |
45 |
|
|
Provides: ruby(abi) = %subver |
46 |
|
|
|
47 |
fwang |
289958 |
Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2 |
48 |
blino |
1152 |
Source3: ruby.macros |
49 |
|
|
URL: http://www.ruby-lang.org/ |
50 |
|
|
|
51 |
fwang |
290007 |
# == FEDORA PATCHES BEGINS == |
52 |
|
|
# http://redmine.ruby-lang.org/issues/5231 |
53 |
|
|
Patch0: ruby-1.9.3-disable-versioned-paths.patch |
54 |
|
|
# TODO: Should be submitted upstream? |
55 |
|
|
Patch1: ruby-1.9.3-arch-specific-dir.patch |
56 |
|
|
# http://redmine.ruby-lang.org/issues/5281 |
57 |
|
|
Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch |
58 |
|
|
# http://redmine.ruby-lang.org/issues/5465 |
59 |
|
|
Patch4: ruby-1.9.3-fix-s390x-build.patch |
60 |
|
|
# Fix the uninstaller, so that it doesn't say that gem doesn't exist |
61 |
|
|
# when it exists outside of the GEM_HOME (already fixed in the upstream) |
62 |
|
|
Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch |
63 |
|
|
# http://redmine.ruby-lang.org/issues/5135 - see comment 29 |
64 |
|
|
Patch6: ruby-1.9.3-webrick-test-fix.patch |
65 |
|
|
# Already fixed upstream: |
66 |
|
|
# https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 |
67 |
|
|
Patch7: ruby-1.9.3-bignum-test-fix.patch |
68 |
|
|
# Allows to install RubyGems into custom directory, outside of Ruby's tree. |
69 |
|
|
# http://redmine.ruby-lang.org/issues/5617 |
70 |
|
|
Patch8: ruby-1.9.3-custom-rubygems-location.patch |
71 |
|
|
# Add support for installing binary extensions according to FHS. |
72 |
|
|
# https://github.com/rubygems/rubygems/issues/210 |
73 |
|
|
Patch9: rubygems-1.8.11-binary-extensions.patch |
74 |
|
|
# Make mkmf verbose by default |
75 |
|
|
Patch12: ruby-1.9.3-mkmf-verbose.patch |
76 |
|
|
# == FEDORA PATCHES ENDS == |
77 |
|
|
|
78 |
blino |
1152 |
%package doc |
79 |
|
|
Summary: Documentation for the powerful language Ruby |
80 |
|
|
Group: Development/Ruby |
81 |
fwang |
202696 |
BuildArch: noarch |
82 |
blino |
1152 |
|
83 |
|
|
%package devel |
84 |
|
|
Summary: Development file for the powerful language Ruby |
85 |
|
|
Group: Development/Ruby |
86 |
|
|
Requires: %{name} = %{version} |
87 |
|
|
|
88 |
|
|
%package tk |
89 |
|
|
Summary: Tk extension for the powerful language Ruby |
90 |
|
|
Group: Development/Ruby |
91 |
|
|
Requires: %{name} = %{version} |
92 |
|
|
|
93 |
fwang |
291551 |
%package RubyGems |
94 |
|
|
Summary: The Ruby standard for packaging ruby libraries |
95 |
|
|
Group: Development/Ruby |
96 |
|
|
Requires: ruby(abi) = %{subver} |
97 |
|
|
Provides: gem = %{version}-%{release} |
98 |
|
|
Provides: ruby(rubygems) = %{version}-%{release} |
99 |
|
|
|
100 |
|
|
%package rake |
101 |
|
|
Summary: Simple ruby build program with capabilities similar to make |
102 |
|
|
Group: Development/Ruby |
103 |
|
|
Requires: ruby(abi) = %{subver} |
104 |
|
|
|
105 |
blino |
1152 |
%description |
106 |
|
|
Ruby is the interpreted scripting language for quick and |
107 |
|
|
easy object-oriented programming. It has many features to |
108 |
|
|
process text files and to do system management tasks (as in |
109 |
|
|
Perl). It is simple, straight-forward, and extensible. |
110 |
|
|
|
111 |
|
|
%description doc |
112 |
|
|
Ruby is the interpreted scripting language for quick and |
113 |
|
|
easy object-oriented programming. It has many features to |
114 |
|
|
process text files and to do system management tasks (as in |
115 |
|
|
Perl). It is simple, straight-forward, and extensible. |
116 |
|
|
|
117 |
|
|
This package contains the Ruby's documentation |
118 |
|
|
|
119 |
|
|
%description devel |
120 |
|
|
Ruby is the interpreted scripting language for quick and |
121 |
|
|
easy object-oriented programming. It has many features to |
122 |
|
|
process text files and to do system management tasks (as in |
123 |
|
|
Perl). It is simple, straight-forward, and extensible. |
124 |
|
|
|
125 |
|
|
This package contains the Ruby's devel files. |
126 |
|
|
|
127 |
|
|
%description tk |
128 |
|
|
Ruby is the interpreted scripting language for quick and |
129 |
|
|
easy object-oriented programming. It has many features to |
130 |
|
|
process text files and to do system management tasks (as in |
131 |
|
|
Perl). It is simple, straight-forward, and extensible. |
132 |
|
|
|
133 |
|
|
This package contains the Tk extension for Ruby. |
134 |
|
|
|
135 |
fwang |
291551 |
%description RubyGems |
136 |
|
|
RubyGems is the Ruby standard for publishing and managing third party |
137 |
|
|
libraries. |
138 |
|
|
|
139 |
fwang |
291552 |
%description rake |
140 |
|
|
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are |
141 |
|
|
specified in standard Ruby syntax. |
142 |
|
|
|
143 |
blino |
1152 |
%prep |
144 |
|
|
%setup -q -n ruby-%{rubyver}-%{patchversion} |
145 |
fwang |
290007 |
%apply_patches |
146 |
blino |
1152 |
|
147 |
|
|
%build |
148 |
fwang |
290038 |
autoconf |
149 |
blino |
1152 |
CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` |
150 |
fwang |
291557 |
%configure2_5x --enable-shared --disable-rpath --enable-pthread --disable-versioned-paths \ |
151 |
|
|
--with-rubylibprefix='%{ruby_libdir}' \ |
152 |
|
|
--with-archdir='%{ruby_libarchdir}' \ |
153 |
fwang |
290007 |
--with-sitedir='%{ruby_sitelibdir}' \ |
154 |
|
|
--with-sitearchdir='%{ruby_sitearchdir}' \ |
155 |
|
|
--with-vendordir='%{ruby_vendorlibdir}' \ |
156 |
|
|
--with-vendorarchdir='%{ruby_vendorarchdir}' \ |
157 |
fwang |
291559 |
--with-rubyhdrdir='%{_includedir}' \ |
158 |
fwang |
290022 |
--with-rubygemsdir='%{rubygems_dir}' |
159 |
blino |
1152 |
%make |
160 |
|
|
|
161 |
|
|
%install |
162 |
|
|
%makeinstall_std install-doc |
163 |
|
|
|
164 |
|
|
install -d %buildroot%{_datadir}/emacs/site-lisp |
165 |
|
|
cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp |
166 |
|
|
|
167 |
|
|
install -d %buildroot%{_sysconfdir}/emacs/site-start.d |
168 |
|
|
cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el |
169 |
|
|
(autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t) |
170 |
|
|
(add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode)) |
171 |
|
|
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) |
172 |
|
|
EOF |
173 |
|
|
|
174 |
|
|
# Install the rpm macros |
175 |
|
|
mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d |
176 |
|
|
cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d |
177 |
fwang |
289961 |
|
178 |
blino |
1152 |
%check |
179 |
|
|
make test |
180 |
|
|
|
181 |
fwang |
289961 |
%files |
182 |
fwang |
291551 |
%{_bindir}/erb |
183 |
|
|
%{_bindir}/irb |
184 |
|
|
%{_bindir}/rake |
185 |
|
|
%{_bindir}/rdoc |
186 |
|
|
%{_bindir}/ri |
187 |
|
|
%{_bindir}/ruby |
188 |
|
|
%{_bindir}/testrb |
189 |
|
|
%{_libdir}/libruby.so.%{subver} |
190 |
|
|
%{_libdir}/libruby.so.%{rubyapi} |
191 |
fwang |
291560 |
%dir %{ruby_libdir} |
192 |
|
|
%{ruby_libdir}/*.rb |
193 |
|
|
%exclude %{ruby_libdir}/multi-tk.rb |
194 |
|
|
%exclude %{ruby_libdir}/remote-tk.rb |
195 |
|
|
%exclude %{ruby_libdir}/tcltk.rb |
196 |
|
|
%exclude %{ruby_libdir}/tk.rb |
197 |
|
|
%exclude %{ruby_libdir}/tkafter.rb |
198 |
|
|
%exclude %{ruby_libdir}/tkbgerror.rb |
199 |
|
|
%exclude %{ruby_libdir}/tkcanvas.rb |
200 |
|
|
%exclude %{ruby_libdir}/tkclass.rb |
201 |
|
|
%exclude %{ruby_libdir}/tkconsole.rb |
202 |
|
|
%exclude %{ruby_libdir}/tkdialog.rb |
203 |
|
|
%exclude %{ruby_libdir}/tkentry.rb |
204 |
|
|
%exclude %{ruby_libdir}/tkfont.rb |
205 |
|
|
%exclude %{ruby_libdir}/tkmacpkg.rb |
206 |
|
|
%exclude %{ruby_libdir}/tkmenubar.rb |
207 |
|
|
%exclude %{ruby_libdir}/tkmngfocus.rb |
208 |
|
|
%exclude %{ruby_libdir}/tkpalette.rb |
209 |
|
|
%exclude %{ruby_libdir}/tkscrollbox.rb |
210 |
|
|
%exclude %{ruby_libdir}/tktext.rb |
211 |
|
|
%exclude %{ruby_libdir}/tkvirtevent.rb |
212 |
|
|
%exclude %{ruby_libdir}/tkwinpkg.rb |
213 |
|
|
%{ruby_libdir}/cgi |
214 |
|
|
%{ruby_libdir}/date |
215 |
|
|
%{ruby_libdir}/digest |
216 |
|
|
%{ruby_libdir}/dl |
217 |
|
|
%{ruby_libdir}/drb |
218 |
|
|
%{ruby_libdir}/fiddle |
219 |
|
|
%{ruby_libdir}/matrix |
220 |
|
|
%{ruby_libdir}/net |
221 |
|
|
%{ruby_libdir}/openssl |
222 |
|
|
%{ruby_libdir}/optparse |
223 |
|
|
%{ruby_libdir}/psych |
224 |
|
|
%{ruby_libdir}/racc |
225 |
|
|
%{ruby_libdir}/rbconfig |
226 |
|
|
%{ruby_libdir}/rexml |
227 |
|
|
%{ruby_libdir}/rinda |
228 |
|
|
%{ruby_libdir}/ripper |
229 |
|
|
%{ruby_libdir}/rss |
230 |
|
|
%{ruby_libdir}/shell |
231 |
|
|
%{ruby_libdir}/syck |
232 |
|
|
%{ruby_libdir}/test |
233 |
|
|
%{ruby_libdir}/uri |
234 |
|
|
%{ruby_libdir}/webrick |
235 |
|
|
%{ruby_libdir}/xmlrpc |
236 |
|
|
%{ruby_libdir}/yaml |
237 |
|
|
%dir %{ruby_libarchdir} |
238 |
|
|
%{ruby_libarchdir}/continuation.so |
239 |
|
|
%{ruby_libarchdir}/coverage.so |
240 |
|
|
%{ruby_libarchdir}/curses.so |
241 |
|
|
%{ruby_libarchdir}/date_core.so |
242 |
|
|
%{ruby_libarchdir}/dbm.so |
243 |
|
|
%dir %{ruby_libarchdir}/digest |
244 |
|
|
%{ruby_libarchdir}/digest.so |
245 |
|
|
%{ruby_libarchdir}/digest/*.so |
246 |
|
|
%dir %{ruby_libarchdir}/dl |
247 |
|
|
%{ruby_libarchdir}/dl.so |
248 |
|
|
%{ruby_libarchdir}/dl/*.so |
249 |
|
|
%dir %{ruby_libarchdir}/enc |
250 |
|
|
%{ruby_libarchdir}/enc/*.so |
251 |
|
|
%{ruby_libarchdir}/etc.so |
252 |
|
|
%{ruby_libarchdir}/fcntl.so |
253 |
|
|
%{ruby_libarchdir}/fiber.so |
254 |
|
|
%{ruby_libarchdir}/fiddle.so |
255 |
|
|
%{ruby_libarchdir}/gdbm.so |
256 |
|
|
%{ruby_libarchdir}/iconv.so |
257 |
|
|
%dir %{ruby_libarchdir}/io |
258 |
|
|
%{ruby_libarchdir}/io/nonblock.so |
259 |
|
|
%{ruby_libarchdir}/io/wait.so |
260 |
|
|
%dir %{ruby_libarchdir}/mathn |
261 |
|
|
%{ruby_libarchdir}/mathn/complex.so |
262 |
|
|
%{ruby_libarchdir}/mathn/rational.so |
263 |
|
|
%{ruby_libarchdir}/nkf.so |
264 |
|
|
%{ruby_libarchdir}/objspace.so |
265 |
|
|
%{ruby_libarchdir}/openssl.so |
266 |
|
|
%{ruby_libarchdir}/pathname.so |
267 |
|
|
%{ruby_libarchdir}/psych.so |
268 |
|
|
%{ruby_libarchdir}/pty.so |
269 |
|
|
%dir %{ruby_libarchdir}/racc |
270 |
|
|
%{ruby_libarchdir}/racc/*.so |
271 |
|
|
%{ruby_libarchdir}/rbconfig.rb |
272 |
|
|
%{ruby_libarchdir}/readline.so |
273 |
|
|
%{ruby_libarchdir}/ripper.so |
274 |
|
|
%{ruby_libarchdir}/sdbm.so |
275 |
|
|
%{ruby_libarchdir}/socket.so |
276 |
|
|
%{ruby_libarchdir}/stringio.so |
277 |
|
|
%{ruby_libarchdir}/strscan.so |
278 |
|
|
%{ruby_libarchdir}/syck.so |
279 |
|
|
%{ruby_libarchdir}/syslog.so |
280 |
|
|
%{ruby_libarchdir}/zlib.so |
281 |
fwang |
291551 |
%dir %{_datadir}/ruby |
282 |
|
|
%{_mandir}/man1/erb.1.* |
283 |
|
|
%{_mandir}/man1/irb.1.* |
284 |
|
|
%{_mandir}/man1/ri.1.* |
285 |
|
|
%{_mandir}/man1/ruby.1.* |
286 |
blino |
1152 |
%{_datadir}/emacs/site-lisp/* |
287 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/* |
288 |
|
|
%{_sysconfdir}/rpm/macros.d/%{name}.macros |
289 |
fwang |
291560 |
%{_datadir}/ruby/site_ruby |
290 |
|
|
%{_libdir}/ruby/site_ruby |
291 |
|
|
%{_datadir}/ruby/vendor_ruby |
292 |
|
|
%{_libdir}/ruby/vendor_ruby |
293 |
blino |
1152 |
|
294 |
|
|
%files doc |
295 |
|
|
%{_datadir}/ri |
296 |
|
|
|
297 |
|
|
%files devel |
298 |
fwang |
290003 |
%{_includedir}/* |
299 |
blino |
1152 |
%{_libdir}/libruby-static.a |
300 |
|
|
%{_libdir}/libruby.so |
301 |
fwang |
290003 |
%{_libdir}/pkgconfig/*.pc |
302 |
blino |
1152 |
|
303 |
|
|
%files tk |
304 |
fwang |
291560 |
%{ruby_libarchdir}/tcltklib.so |
305 |
|
|
%{ruby_libarchdir}/tkutil.so |
306 |
|
|
%{ruby_libdir}/multi-tk.rb |
307 |
|
|
%{ruby_libdir}/remote-tk.rb |
308 |
|
|
%{ruby_libdir}/tcltk.rb |
309 |
|
|
%{ruby_libdir}/tk.rb |
310 |
|
|
%{ruby_libdir}/tkafter.rb |
311 |
|
|
%{ruby_libdir}/tkbgerror.rb |
312 |
|
|
%{ruby_libdir}/tkcanvas.rb |
313 |
|
|
%{ruby_libdir}/tkclass.rb |
314 |
|
|
%{ruby_libdir}/tkconsole.rb |
315 |
|
|
%{ruby_libdir}/tkdialog.rb |
316 |
|
|
%{ruby_libdir}/tkentry.rb |
317 |
|
|
%{ruby_libdir}/tkfont.rb |
318 |
|
|
%{ruby_libdir}/tkmacpkg.rb |
319 |
|
|
%{ruby_libdir}/tkmenubar.rb |
320 |
|
|
%{ruby_libdir}/tkmngfocus.rb |
321 |
|
|
%{ruby_libdir}/tkpalette.rb |
322 |
|
|
%{ruby_libdir}/tkscrollbox.rb |
323 |
|
|
%{ruby_libdir}/tktext.rb |
324 |
|
|
%{ruby_libdir}/tkvirtevent.rb |
325 |
|
|
%{ruby_libdir}/tkwinpkg.rb |
326 |
|
|
%{ruby_libdir}/tk |
327 |
|
|
%{ruby_libdir}/tkextlib |
328 |
fwang |
291551 |
|
329 |
|
|
%files RubyGems |
330 |
|
|
%{_bindir}/gem |
331 |
|
|
%dir %{_libdir}/ruby/gems |
332 |
|
|
%dir %{_libdir}/ruby/gems/%{rubyapi} |
333 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/cache |
334 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/doc |
335 |
|
|
%dir %{_libdir}/ruby/gems/%{rubyapi}/gems |
336 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/gems/rdoc-* |
337 |
|
|
%dir %{_libdir}/ruby/gems/%{rubyapi}/specifications |
338 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/specifications/bigdecimal-*.gemspec |
339 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/specifications/io-console-*.gemspec |
340 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/specifications/json-*.gemspec |
341 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/specifications/minitest-*.gemspec |
342 |
|
|
%{_libdir}/ruby/gems/%{rubyapi}/specifications/rdoc-*.gemspec |
343 |
|
|
%dir %{rubygems_dir} |
344 |
|
|
%{rubygems_dir}/rbconfig |
345 |
|
|
%{rubygems_dir}/rubygems |
346 |
|
|
%{rubygems_dir}/rubygems.rb |
347 |
|
|
%{rubygems_dir}/ubygems.rb |
348 |
|
|
|
349 |
|
|
%files rake |
350 |
|
|
%{_bindir}/rake |
351 |
|
|
%{_mandir}/man1/rake.1.* |
352 |
fwang |
291553 |
%{_libdir}/ruby/gems/%{rubyapi}/gems/rake-* |
353 |
fwang |
291551 |
%{_libdir}/ruby/gems/%{rubyapi}/specifications/rake-*.gemspec |
354 |
fwang |
291558 |
%{_libdir}/ruby/rake |
355 |
|
|
%{_libdir}/ruby/rake.rb |