File ruby19.spec of Package ruby19
# norootforbuild
Name: ruby19
Version: 1.9.1.preview2
Release: 0
#
%define pkg_version 1.9.1
%define patch_level preview2
%define rb_ver %(echo %{pkg_version} | sed -e 's/\\\.[0-9]\\\+$//')
%if 0%{?suse_version} == 1100
%define needs_optimization_zero 1
%endif
#
License: GPL v2 or later
Group: Development/Languages/Ruby
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildRequires: bison gdbm-devel gperf graphviz libjpeg-devel openssl-devel readline-devel tk-devel
BuildRequires: gdbm-devel ncurses-devel openssl-devel readline-devel zlib-devel tk-devel
%if 0%{?suse_version} > 1010
BuildRequires: xorg-x11-libX11-devel
%else
BuildRequires: xorg-x11-devel
%endif
%if 0%{?suse_version} > 1020
BuildRequires: valgrind-devel
%else
BuildRequires: valgrind
%endif
#
Url: http://www.ruby-lang.org/
Source: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{pkg_version}-%{patch_level}.tar.bz2
Source6: ruby19.macros
Patch: ruby-1.9.1-preview2_mkconfig_continued_line.patch
#
Summary: An Interpreted Object-Oriented Scripting Language
%description
Ruby is an interpreted scripting language for quick and easy
object-oriented programming. It has many features for processing text
files and performing system management tasks (as in Perl). It is
simple, straight-forward, and extensible.
* Ruby features:
- Simple Syntax
- *Normal* Object-Oriented features (class, method calls, for
example)
- *Advanced* Object-Oriented features(Mix-in, Singleton-method, for
example)
- Operator Overloading
- Exception Handling
- Iterators and Closures
- Garbage Collection
- Dynamic Loading of Object Files (on some architectures)
- Highly Portable (works on many UNIX machines; DOS, Windows, Mac,
BeOS, and more)
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%package devel
License: GPL v2 or later
Group: Development/Languages/Ruby
Summary: Development files to link against Ruby
Requires: %{name} = %{version}
%if 0%{?with_bleak_house}
Requires: ruby_with_bleak_house = %{bleak_house_version}
Provides: ruby-devel_with_bleak_house = %{bleak_house_version}-%{release}
%endif
%description devel
Development files to link against Ruby.
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%package tk
License: GPL v2 or later
Group: Development/Languages/Ruby
Summary: TCL/TK bindings for Ruby
Requires: %{name} = %{version}
%description tk
TCL/TK bindings for Ruby
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%package doc-ri
License: GPL v2 or later
Group: Development/Languages/Ruby
Summary: Ruby Interactive Documentation
Requires: %{name} = %{version}
%description doc-ri
This package contains the RI docs for ruby
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%package doc-html
License: GPL v2 or later
Group: Development/Languages/Ruby
Summary: This package contains the HTML docs for ruby
%description doc-html
This package contains the HTML docs for ruby
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%package examples
License: GPL v2 or later
Group: Development/Languages/Ruby
Summary: Example scripts for ruby
Requires: %{name} = %{version}
%description examples
Example scripts for ruby
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%package test-suite
License: GPL v2 or later
Group: Development/Languages/Ruby
Summary: An Interpreted Object-Oriented Scripting Language
%description test-suite
Ruby is an interpreted scripting language for quick and easy
object-oriented programming. It has many features for processing text
files and performing system management tasks (as in Perl). It is
simple, straight-forward, and extensible.
* Ruby features:
- Simple Syntax
- *Normal* Object-Oriented features (class, method calls, for
example)
- *Advanced* Object-Oriented features(Mix-in, Singleton-method, for
example)
- Operator Overloading
- Exception Handling
- Iterators and Closures
- Garbage Collection
- Dynamic Loading of Object Files (on some architectures)
- Highly Portable (works on many UNIX machines; DOS, Windows, Mac,
BeOS, and more)
Authors:
--------
Yukihiro Matsumoto <matz@netlab.co.jp>
%prep
%setup -q -n ruby-%{pkg_version}-%{patch_level}
%patch
%if 0%{?needs_optimization_zero}
touch -r configure configure.timestamp
perl -p -i.bak -e 's|-O2|-O0|g' configure
diff -urN configure{.bak,} ||:
touch -r configure.timestamp configure
%endif
%build
%if 0%{?needs_optimization_zero}
export CFLAGS="%{optflags}"
export CFLAGS="${CFLAGS//-O2/}"
export CXXFLAGS="$CFLAGS"
export FFLAGS="$CFLAGS"
%endif
%configure --enable-shared --enable-frame-address --with-valgrind
make all
%install
%makeinstall
for i in %{buildroot}%{_bindir}/* ; do mv ${i}{,19} ; done
for i in %{buildroot}%{_mandir}/man1/* ; do mv "${i}" "${i%%.1}19.1" ; done
for i in $(grep -l '#!/usr/bin/ruby' %{buildroot}%{_bindir}/*) ; do
perl -p -i -e 's|#!/usr/bin/ruby|#!/usr/bin/ruby19|' $i ;
done
%check
export LD_LIBRARY_PATH="$PWD"
make check ||:
%clean
%{__rm} -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/erb19
%{_bindir}/gem19
%{_bindir}/irb19
%{_bindir}/rake19
%{_bindir}/rdoc19
%{_bindir}/ri19
%{_bindir}/ruby19
%{_bindir}/testrb19
%{_libdir}/libruby.so.1.9
%{_libdir}/libruby.so.1.9.1
%{_libdir}/ruby/
%{_mandir}/man1/irb19.1*
%{_mandir}/man1/rake19.1*
%{_mandir}/man1/ruby19.1*
%files devel
%defattr(-,root,root,-)
%{_includedir}/ruby-%{pkg_version}
%{_libdir}/libruby-static.a
%{_libdir}/libruby.so
%files doc-ri
%defattr(-,root,root,-)
%dir %{_datadir}/ri/
%{_datadir}/ri/%{pkg_version}/
%changelog