1 |
%define subver 1.9 |
2 |
%define rubyapi 1.9.1 |
3 |
%define rubyver 1.9.3 |
4 |
%define patchversion p194 |
5 |
%define rel 1 |
6 |
|
7 |
# This is the local lib/arch and should not be used for packaging. |
8 |
%define ruby_sitelibdir %{_datadir}/ruby/site_ruby/%{rubyapi} |
9 |
%define ruby_sitearchdir %{_libdir}/ruby/site_ruby/%{rubyapi} |
10 |
|
11 |
# This is the general location for libs/archs compatible with all |
12 |
# or most of the Ruby versions available in the Fedora repositories. |
13 |
%define ruby_vendorlibdir %{_datadir}/ruby/vendor_ruby/%{rubyapi} |
14 |
%define ruby_vendorarchdir %{_libdir}/ruby/vendor_ruby/%{rubyapi} |
15 |
|
16 |
# The RubyGems library has to stay out of Ruby directory three, since the |
17 |
# RubyGems should be share by all Ruby implementations. |
18 |
%define rubygems_dir %{_datadir}/ruby/gems/%{rubyapi} |
19 |
|
20 |
Summary: Object Oriented Script Language |
21 |
Name: ruby |
22 |
Version: %{rubyver}.%{patchversion} |
23 |
Release: %mkrel %rel |
24 |
License: Ruby or GPLv2 |
25 |
Group: Development/Ruby |
26 |
BuildRequires: autoconf |
27 |
BuildRequires: byacc |
28 |
BuildRequires: ncurses-devel |
29 |
BuildRequires: readline-devel |
30 |
BuildRequires: tcl-devel tk-devel |
31 |
BuildRequires: db-devel |
32 |
BuildRequires: gdbm-devel >= 1.8.3 |
33 |
BuildRequires: openssl-devel |
34 |
BuildRequires: zlib-devel |
35 |
BuildRequires: libffi-devel |
36 |
BuildRequires: yaml-devel |
37 |
BuildRequires: rpm-mageia-setup >= 1.158 |
38 |
Obsoletes: ruby-rexml |
39 |
Provides: ruby-rexml |
40 |
# explicit file provides (since such requires are automatically added by find-requires) |
41 |
Provides: /usr/bin/ruby |
42 |
Provides: ruby(abi) = %subver |
43 |
|
44 |
Source0: http://ftp.ruby-lang.org/pub/ruby/%{subver}/ruby-%{rubyver}-%{patchversion}.tar.bz2 |
45 |
Source3: ruby.macros |
46 |
URL: http://www.ruby-lang.org/ |
47 |
|
48 |
# == FEDORA PATCHES BEGINS == |
49 |
# http://redmine.ruby-lang.org/issues/5231 |
50 |
Patch0: ruby-1.9.3-disable-versioned-paths.patch |
51 |
# TODO: Should be submitted upstream? |
52 |
Patch1: ruby-1.9.3-arch-specific-dir.patch |
53 |
# http://redmine.ruby-lang.org/issues/5281 |
54 |
Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch |
55 |
# http://redmine.ruby-lang.org/issues/5465 |
56 |
Patch4: ruby-1.9.3-fix-s390x-build.patch |
57 |
# Fix the uninstaller, so that it doesn't say that gem doesn't exist |
58 |
# when it exists outside of the GEM_HOME (already fixed in the upstream) |
59 |
Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch |
60 |
# http://redmine.ruby-lang.org/issues/5135 - see comment 29 |
61 |
Patch6: ruby-1.9.3-webrick-test-fix.patch |
62 |
# Already fixed upstream: |
63 |
# https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 |
64 |
Patch7: ruby-1.9.3-bignum-test-fix.patch |
65 |
# Allows to install RubyGems into custom directory, outside of Ruby's tree. |
66 |
# http://redmine.ruby-lang.org/issues/5617 |
67 |
Patch8: ruby-1.9.3-custom-rubygems-location.patch |
68 |
# Add support for installing binary extensions according to FHS. |
69 |
# https://github.com/rubygems/rubygems/issues/210 |
70 |
Patch9: rubygems-1.8.11-binary-extensions.patch |
71 |
# Make mkmf verbose by default |
72 |
Patch12: ruby-1.9.3-mkmf-verbose.patch |
73 |
# == FEDORA PATCHES ENDS == |
74 |
|
75 |
%package doc |
76 |
Summary: Documentation for the powerful language Ruby |
77 |
Group: Development/Ruby |
78 |
BuildArch: noarch |
79 |
|
80 |
%package devel |
81 |
Summary: Development file for the powerful language Ruby |
82 |
Group: Development/Ruby |
83 |
Requires: %{name} = %{version} |
84 |
|
85 |
%package tk |
86 |
Summary: Tk extension for the powerful language Ruby |
87 |
Group: Development/Ruby |
88 |
Requires: %{name} = %{version} |
89 |
|
90 |
%description |
91 |
Ruby is the interpreted scripting language for quick and |
92 |
easy object-oriented programming. It has many features to |
93 |
process text files and to do system management tasks (as in |
94 |
Perl). It is simple, straight-forward, and extensible. |
95 |
|
96 |
%description doc |
97 |
Ruby is the interpreted scripting language for quick and |
98 |
easy object-oriented programming. It has many features to |
99 |
process text files and to do system management tasks (as in |
100 |
Perl). It is simple, straight-forward, and extensible. |
101 |
|
102 |
This package contains the Ruby's documentation |
103 |
|
104 |
%description devel |
105 |
Ruby is the interpreted scripting language for quick and |
106 |
easy object-oriented programming. It has many features to |
107 |
process text files and to do system management tasks (as in |
108 |
Perl). It is simple, straight-forward, and extensible. |
109 |
|
110 |
This package contains the Ruby's devel files. |
111 |
|
112 |
%description tk |
113 |
Ruby is the interpreted scripting language for quick and |
114 |
easy object-oriented programming. It has many features to |
115 |
process text files and to do system management tasks (as in |
116 |
Perl). It is simple, straight-forward, and extensible. |
117 |
|
118 |
This package contains the Tk extension for Ruby. |
119 |
|
120 |
%prep |
121 |
%setup -q -n ruby-%{rubyver}-%{patchversion} |
122 |
%apply_patches |
123 |
|
124 |
%build |
125 |
CFLAGS=`echo %optflags | sed 's/-fomit-frame-pointer//'` |
126 |
%configure2_5x --enable-shared --disable-rpath --enable-pthread \ |
127 |
--with-sitedir='%{ruby_sitelibdir}' \ |
128 |
--with-sitearchdir='%{ruby_sitearchdir}' \ |
129 |
--with-vendordir='%{ruby_vendorlibdir}' \ |
130 |
--with-vendorarchdir='%{ruby_vendorarchdir}' \ |
131 |
--with-rubygemsdir='%{rubygems_dir}' |
132 |
%make |
133 |
|
134 |
%install |
135 |
%makeinstall_std install-doc |
136 |
|
137 |
install -d %buildroot%{_datadir}/emacs/site-lisp |
138 |
cp -a misc/ruby-mode.el %buildroot%{_datadir}/emacs/site-lisp |
139 |
|
140 |
install -d %buildroot%{_sysconfdir}/emacs/site-start.d |
141 |
cat <<EOF >%buildroot%{_sysconfdir}/emacs/site-start.d/%{name}.el |
142 |
(autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t) |
143 |
(add-to-list 'auto-mode-alist '("\\\\.rb$" . ruby-mode)) |
144 |
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) |
145 |
EOF |
146 |
|
147 |
# Install the rpm macros |
148 |
mkdir -p %buildroot%{_sysconfdir}/rpm/macros.d |
149 |
cp %{SOURCE3} %buildroot%{_sysconfdir}/rpm/macros.d |
150 |
|
151 |
%check |
152 |
make test |
153 |
|
154 |
%files |
155 |
%{_bindir}/* |
156 |
%{_libdir}/libruby.so.* |
157 |
%{_libdir}/ruby |
158 |
%{_mandir}/*/* |
159 |
%{_datadir}/emacs/site-lisp/* |
160 |
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/* |
161 |
%{_sysconfdir}/rpm/macros.d/%{name}.macros |
162 |
|
163 |
%files doc |
164 |
%{_datadir}/ri |
165 |
|
166 |
%files devel |
167 |
%{_includedir}/* |
168 |
%{_libdir}/libruby-static.a |
169 |
%{_libdir}/libruby.so |
170 |
%{_libdir}/pkgconfig/*.pc |
171 |
|
172 |
%files tk |