Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %define _rpmfilename %%{NAME}-%%{VERSION}.%%{ARCH}.rpm
- %define rubyver 2.1.2
- Name: ruby21
- Version: %{rubyver}
- Release: 1%{?dist}
- License: Ruby License/GPL - see COPYING
- URL: http://www.ruby-lang.org/
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
- BuildRequires: readline
- BuildRequires: readline-devel
- BuildRequires: gcc
- BuildRequires: openssl-devel
- BuildRequires: make
- BuildRequires: libyaml-devel
- BuildRequires: zlib-devel
- Source0: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{rubyver}.tar.gz
- Summary: An interpreter of object-oriented scripting language
- Group: Development/Languages
- Provides: ruby(abi) = 2.1
- Provides: ruby-irb
- Provides: ruby-rdoc
- Provides: ruby-libs
- Provides: ruby-devel
- Provides: ruby(rubygems)
- Obsoletes: ruby21 < 2.1.2
- %description
- Ruby is the interpreted scripting language for quick and easy
- object-oriented programming. It has many features to process text
- files and to do system management tasks (as in Perl). It is simple,
- straight-forward, and extensible.
- %prep
- %setup -n ruby-%{rubyver}
- %build
- export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing"
- ./configure \
- --prefix=/opt/rubies/ruby-%{rubyver} \
- --enable-shared \
- --disable-rpath \
- --without-X11 \
- --without-tk \
- --includedir=/opt/rubies/ruby-%{rubyver}%{_includedir}/ruby \
- --libdir=/opt/rubies/ruby-%{rubyver}%{_libdir}
- make %{?_smp_mflags}
- %install
- make install DESTDIR=$RPM_BUILD_ROOT
- #we don't want to keep the src directory
- rm -rf $RPM_BUILD_ROOT/usr/src
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- cat <<EOF > /etc/ld.so.conf.d/%{name}.conf
- /opt/rubies/ruby-%{rubyver}%{_libdir}
- EOF
- ldconfig
- %preun
- rm -f /etc/ld.so.conf.d/%{name}.conf
- %postun
- ldconfig
- %files
- %defattr(-, root, root)
- /opt/rubies/ruby-%{rubyver}
- %changelog
Advertisement
Add Comment
Please, Sign In to add comment