1 |
%define subver 1.9 |
2 |
%define rubyapi 1.9.1 |
3 |
%define rubyver 1.9.3 |
4 |
%define patchversion p194 |
5 |
%define rel 3 |
6 |
|
7 |
%define ruby_libdir %{_datadir}/%{name} |
8 |
%define ruby_libarchdir %{_libdir}/%{name} |
9 |
|
10 |
# This is the local lib/arch and should not be used for packaging. |
11 |
%define ruby_sitelibdir %{_datadir}/ruby/site_ruby |
12 |
%define ruby_sitearchdir %{_libdir}/ruby/site_ruby |
13 |
|
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 |
%define ruby_vendorlibdir %{_datadir}/ruby/vendor_ruby |
17 |
%define ruby_vendorarchdir %{_libdir}/ruby/vendor_ruby |
18 |
|
19 |
# The RubyGems library has to stay out of Ruby directory three, since the |
20 |
# RubyGems should be share by all Ruby implementations. |
21 |
%define rubygems_dir %{_datadir}/ruby/gems |
22 |
|
23 |
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 |
BuildRequires: db-devel |
35 |
BuildRequires: gdbm-devel >= 1.8.3 |
36 |
BuildRequires: openssl-devel |
37 |
BuildRequires: zlib-devel |
38 |
BuildRequires: libffi-devel |
39 |
BuildRequires: yaml-devel |
40 |
BuildRequires: rpm-mageia-setup >= 1.158 |
41 |
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 |
Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2 |
48 |
Source3: ruby.macros |
49 |
URL: http://www.ruby-lang.org/ |
50 |
|
51 |
# == 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 |
%package doc |
79 |
Summary: Documentation for the powerful language Ruby |
80 |
Group: Development/Ruby |
81 |
BuildArch: noarch |
82 |
|
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 |
%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 |
BuildArch: noarch |
100 |
|
101 |
%package rake |
102 |
Summary: Simple ruby build program with capabilities similar to make |
103 |
Group: Development/Ruby |
104 |
Requires: ruby(abi) = %{subver} |
105 |
BuildArch: noarch |
106 |
|
107 |
%description |
108 |
Ruby is the interpreted scripting language for quick and |
109 |
easy object-oriented programming. It has many features to |
110 |
process text files and to do system management tasks (as in |
111 |
Perl). It is simple, straight-forward, and extensible. |
112 |
|
113 |
%description doc |
114 |
Ruby is the interpreted scripting language for quick and |
115 |
easy object-oriented programming. It has many features to |
116 |
process text files and to do system management tasks (as in |
117 |
Perl). It is simple, straight-forward, and extensible. |
118 |
|
119 |
This package contains the Ruby's documentation |
120 |
|
121 |
%description devel |
122 |
Ruby is the interpreted scripting language for quick and |
123 |
easy object-oriented programming. It has many features to |
124 |
process text files and to do system management tasks (as in |
125 |
Perl). It is simple, straight-forward, and extensible. |
126 |
|
127 |
This package contains the Ruby's devel files. |
128 |
|
129 |
%description tk |
130 |
Ruby is the interpreted scripting language for quick and |
131 |
easy object-oriented programming. It has many features to |
132 |
process text files and to do system management tasks (as in |
133 |
Perl). It is simple, straight-forward, and extensible. |
134 |
|
135 |
This package contains the Tk extension for Ruby. |
136 |
|
137 |
%description RubyGems |
138 |
RubyGems is the Ruby standard for publishing and managing third party |
139 |
libraries. |
140 |
|
141 |
%description rake |
142 |
Rake is a Make-like program implemented in Ruby. Tasks and dependencies are |
143 |
specified in standard Ruby syntax. |
144 |
|
145 |
%prep |
146 |
%setup -q -n ruby-%{rubyver}-%{patchversion} |
147 |
%apply_patches |
148 |
|
149 |
%build |
150 |
autoconf |
151 |
CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` |
152 |
%configure2_5x --enable-shared --disable-rpath --enable-pthread --disable-versioned-paths \ |
153 |
--with-rubylibprefix='%{ruby_libdir}' \ |
154 |
--with-archdir='%{ruby_libarchdir}' \ |
155 |
--with-sitedir='%{ruby_sitelibdir}' \ |
156 |
--with-sitearchdir='%{ruby_sitearchdir}' \ |
157 |
--with-vendordir='%{ruby_vendorlibdir}' \ |
158 |
--with-vendorarchdir='%{ruby_vendorarchdir}' \ |
159 |
--with-rubyhdrdir='%{_includedir}' \ |
160 |
--with-rubygemsdir='%{rubygems_dir}' |
161 |
%make |
162 |
|
163 |
%install |
164 |
%makeinstall_std install-doc |
165 |
|
166 |
install -d %buildroot%{_datadir}/emacs/site-lisp |
167 |
cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp |
168 |
|
169 |
install -d %buildroot%{_sysconfdir}/emacs/site-start.d |
170 |
cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el |
171 |
(autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t) |
172 |
(add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode)) |
173 |
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) |
174 |
EOF |
175 |
|
176 |
# Install the rpm macros |
177 |
mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d |
178 |
cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d |
179 |
|
180 |
%check |
181 |
make test |
182 |
|
183 |
%files |
184 |
%{_bindir}/erb |
185 |
%{_bindir}/irb |
186 |
%{_bindir}/rake |
187 |
%{_bindir}/rdoc |
188 |
%{_bindir}/ri |
189 |
%{_bindir}/ruby |
190 |
%{_bindir}/testrb |
191 |
%{_libdir}/libruby.so.%{subver} |
192 |
%{_libdir}/libruby.so.%{rubyapi} |
193 |
%dir %{ruby_libdir} |
194 |
%{ruby_libdir}/*.rb |
195 |
%exclude %{ruby_libdir}/multi-tk.rb |
196 |
%exclude %{ruby_libdir}/remote-tk.rb |
197 |
%exclude %{ruby_libdir}/tcltk.rb |
198 |
%exclude %{ruby_libdir}/tk.rb |
199 |
%exclude %{ruby_libdir}/tkafter.rb |
200 |
%exclude %{ruby_libdir}/tkbgerror.rb |
201 |
%exclude %{ruby_libdir}/tkcanvas.rb |
202 |
%exclude %{ruby_libdir}/tkclass.rb |
203 |
%exclude %{ruby_libdir}/tkconsole.rb |
204 |
%exclude %{ruby_libdir}/tkdialog.rb |
205 |
%exclude %{ruby_libdir}/tkentry.rb |
206 |
%exclude %{ruby_libdir}/tkfont.rb |
207 |
%exclude %{ruby_libdir}/tkmacpkg.rb |
208 |
%exclude %{ruby_libdir}/tkmenubar.rb |
209 |
%exclude %{ruby_libdir}/tkmngfocus.rb |
210 |
%exclude %{ruby_libdir}/tkpalette.rb |
211 |
%exclude %{ruby_libdir}/tkscrollbox.rb |
212 |
%exclude %{ruby_libdir}/tktext.rb |
213 |
%exclude %{ruby_libdir}/tkvirtevent.rb |
214 |
%exclude %{ruby_libdir}/tkwinpkg.rb |
215 |
%{ruby_libdir}/cgi |
216 |
%{ruby_libdir}/date |
217 |
%{ruby_libdir}/digest |
218 |
%{ruby_libdir}/dl |
219 |
%{ruby_libdir}/drb |
220 |
%{ruby_libdir}/fiddle |
221 |
%{ruby_libdir}/matrix |
222 |
%{ruby_libdir}/net |
223 |
%{ruby_libdir}/openssl |
224 |
%{ruby_libdir}/optparse |
225 |
%{ruby_libdir}/psych |
226 |
%{ruby_libdir}/racc |
227 |
%{ruby_libdir}/rbconfig |
228 |
%{ruby_libdir}/rexml |
229 |
%{ruby_libdir}/rinda |
230 |
%{ruby_libdir}/ripper |
231 |
%{ruby_libdir}/rss |
232 |
%{ruby_libdir}/shell |
233 |
%{ruby_libdir}/syck |
234 |
%{ruby_libdir}/test |
235 |
%{ruby_libdir}/uri |
236 |
%{ruby_libdir}/webrick |
237 |
%{ruby_libdir}/xmlrpc |
238 |
%{ruby_libdir}/yaml |
239 |
%dir %{ruby_libarchdir} |
240 |
%{ruby_libarchdir}/continuation.so |
241 |
%{ruby_libarchdir}/coverage.so |
242 |
%{ruby_libarchdir}/curses.so |
243 |
%{ruby_libarchdir}/date_core.so |
244 |
%{ruby_libarchdir}/dbm.so |
245 |
%dir %{ruby_libarchdir}/digest |
246 |
%{ruby_libarchdir}/digest.so |
247 |
%{ruby_libarchdir}/digest/*.so |
248 |
%dir %{ruby_libarchdir}/dl |
249 |
%{ruby_libarchdir}/dl.so |
250 |
%{ruby_libarchdir}/dl/*.so |
251 |
%dir %{ruby_libarchdir}/enc |
252 |
%{ruby_libarchdir}/enc/*.so |
253 |
%{ruby_libarchdir}/etc.so |
254 |
%{ruby_libarchdir}/fcntl.so |
255 |
%{ruby_libarchdir}/fiber.so |
256 |
%{ruby_libarchdir}/fiddle.so |
257 |
%{ruby_libarchdir}/gdbm.so |
258 |
%{ruby_libarchdir}/iconv.so |
259 |
%dir %{ruby_libarchdir}/io |
260 |
%{ruby_libarchdir}/io/nonblock.so |
261 |
%{ruby_libarchdir}/io/wait.so |
262 |
%dir %{ruby_libarchdir}/mathn |
263 |
%{ruby_libarchdir}/mathn/complex.so |
264 |
%{ruby_libarchdir}/mathn/rational.so |
265 |
%{ruby_libarchdir}/nkf.so |
266 |
%{ruby_libarchdir}/objspace.so |
267 |
%{ruby_libarchdir}/openssl.so |
268 |
%{ruby_libarchdir}/pathname.so |
269 |
%{ruby_libarchdir}/psych.so |
270 |
%{ruby_libarchdir}/pty.so |
271 |
%dir %{ruby_libarchdir}/racc |
272 |
%{ruby_libarchdir}/racc/*.so |
273 |
%{ruby_libarchdir}/rbconfig.rb |
274 |
%{ruby_libarchdir}/readline.so |
275 |
%{ruby_libarchdir}/ripper.so |
276 |
%{ruby_libarchdir}/sdbm.so |
277 |
%{ruby_libarchdir}/socket.so |
278 |
%{ruby_libarchdir}/stringio.so |
279 |
%{ruby_libarchdir}/strscan.so |
280 |
%{ruby_libarchdir}/syck.so |
281 |
%{ruby_libarchdir}/syslog.so |
282 |
%{ruby_libarchdir}/zlib.so |
283 |
%dir %{_datadir}/ruby |
284 |
%{_mandir}/man1/erb.1.* |
285 |
%{_mandir}/man1/irb.1.* |
286 |
%{_mandir}/man1/ri.1.* |
287 |
%{_mandir}/man1/ruby.1.* |
288 |
%{_datadir}/emacs/site-lisp/* |
289 |
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/* |
290 |
%{_sysconfdir}/rpm/macros.d/%{name}.macros |
291 |
%{_datadir}/ruby/site_ruby |
292 |
%{_libdir}/ruby/site_ruby |
293 |
%{_datadir}/ruby/vendor_ruby |
294 |
%{_libdir}/ruby/vendor_ruby |
295 |
|
296 |
%files doc |
297 |
%{_datadir}/ri |
298 |
|
299 |
%files devel |
300 |
%{_includedir}/* |
301 |
%{_libdir}/libruby-static.a |
302 |
%{_libdir}/libruby.so |
303 |
%{_libdir}/pkgconfig/*.pc |
304 |
|
305 |
%files tk |
306 |
%{ruby_libarchdir}/tcltklib.so |
307 |
%{ruby_libarchdir}/tkutil.so |
308 |
%{ruby_libdir}/multi-tk.rb |
309 |
%{ruby_libdir}/remote-tk.rb |
310 |
%{ruby_libdir}/tcltk.rb |
311 |
%{ruby_libdir}/tk.rb |
312 |
%{ruby_libdir}/tkafter.rb |
313 |
%{ruby_libdir}/tkbgerror.rb |
314 |
%{ruby_libdir}/tkcanvas.rb |
315 |
%{ruby_libdir}/tkclass.rb |
316 |
%{ruby_libdir}/tkconsole.rb |
317 |
%{ruby_libdir}/tkdialog.rb |
318 |
%{ruby_libdir}/tkentry.rb |
319 |
%{ruby_libdir}/tkfont.rb |
320 |
%{ruby_libdir}/tkmacpkg.rb |
321 |
%{ruby_libdir}/tkmenubar.rb |
322 |
%{ruby_libdir}/tkmngfocus.rb |
323 |
%{ruby_libdir}/tkpalette.rb |
324 |
%{ruby_libdir}/tkscrollbox.rb |
325 |
%{ruby_libdir}/tktext.rb |
326 |
%{ruby_libdir}/tkvirtevent.rb |
327 |
%{ruby_libdir}/tkwinpkg.rb |
328 |
%{ruby_libdir}/tk |
329 |
%{ruby_libdir}/tkextlib |
330 |
|
331 |
%files RubyGems |
332 |
%{_bindir}/gem |
333 |
%dir %{rubygems_dir} |
334 |
%{rubygems_dir}/rbconfig |
335 |
%{rubygems_dir}/rubygems |
336 |
%{rubygems_dir}/rubygems.rb |
337 |
%{rubygems_dir}/ubygems.rb |
338 |
|
339 |
%files rake |
340 |
%{_bindir}/rake |
341 |
%{_mandir}/man1/rake.1.* |