Guest User

Untitled

a guest
Feb 25th, 2015
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. %define _rpmfilename %%{NAME}-%%{VERSION}.%%{ARCH}.rpm
  2. %define rubyver 2.1.2
  3.  
  4. Name: ruby21
  5. Version: %{rubyver}
  6. Release: 1%{?dist}
  7. License: Ruby License/GPL - see COPYING
  8. URL: http://www.ruby-lang.org/
  9. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  10. BuildRequires: readline
  11. BuildRequires: readline-devel
  12. BuildRequires: gcc
  13. BuildRequires: openssl-devel
  14. BuildRequires: make
  15. BuildRequires: libyaml-devel
  16. BuildRequires: zlib-devel
  17. Source0: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{rubyver}.tar.gz
  18. Summary: An interpreter of object-oriented scripting language
  19. Group: Development/Languages
  20. Provides: ruby(abi) = 2.1
  21. Provides: ruby-irb
  22. Provides: ruby-rdoc
  23. Provides: ruby-libs
  24. Provides: ruby-devel
  25. Provides: ruby(rubygems)
  26. Obsoletes: ruby21 < 2.1.2
  27.  
  28. %description
  29. Ruby is the interpreted scripting language for quick and easy
  30. object-oriented programming. It has many features to process text
  31. files and to do system management tasks (as in Perl). It is simple,
  32. straight-forward, and extensible.
  33.  
  34. %prep
  35. %setup -n ruby-%{rubyver}
  36.  
  37. %build
  38. export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing"
  39.  
  40. ./configure \
  41. --prefix=/opt/rubies/ruby-%{rubyver} \
  42. --enable-shared \
  43. --disable-rpath \
  44. --without-X11 \
  45. --without-tk \
  46. --includedir=/opt/rubies/ruby-%{rubyver}%{_includedir}/ruby \
  47. --libdir=/opt/rubies/ruby-%{rubyver}%{_libdir}
  48.  
  49. make %{?_smp_mflags}
  50.  
  51. %install
  52. make install DESTDIR=$RPM_BUILD_ROOT
  53.  
  54. #we don't want to keep the src directory
  55. rm -rf $RPM_BUILD_ROOT/usr/src
  56.  
  57. %clean
  58. rm -rf $RPM_BUILD_ROOT
  59.  
  60. %post
  61. cat <<EOF > /etc/ld.so.conf.d/%{name}.conf
  62. /opt/rubies/ruby-%{rubyver}%{_libdir}
  63. EOF
  64.  
  65. ldconfig
  66.  
  67. %preun
  68. rm -f /etc/ld.so.conf.d/%{name}.conf
  69.  
  70. %postun
  71. ldconfig
  72.  
  73. %files
  74. %defattr(-, root, root)
  75. /opt/rubies/ruby-%{rubyver}
  76.  
  77. %changelog
Advertisement
Add Comment
Please, Sign In to add comment