%global rvm_dir /usr/lib/rvm %global rvm_group rvm # RVM can not be sourced with default /bin/sh %define _buildshell /bin/bash # PL conventions %define name rvm-ruby # pick a RVM version from https://github.com/wayneeseguin/rvm/tags %define version 1.22.9 %define taglevel 1 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} Summary: Ruby Version Manager (including Rubies and Gems) Name: %{name} Version: %{version} Release: %{release} License: ASL 2.0 URL: http://rvm.io/ Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: bash curl git BuildRequires: gcc-c++ patch chrpath readline readline-devel zlib-devel libyaml-devel libffi-devel openssl-devel autoconf automake libtool bison BuildRequires: sed grep tar gzip bzip2 make file # for OMF: BuildRequires: tar libxml2 libxml2-devel libxslt libxslt-devel Requires(pre): shadow-utils # For rvm Requires: bash curl git # Basics for building ruby 1.8/1.9 # We expect all the building to take place .. at build-time, so let's take this out #Requires: gcc-c++ patch readline readline-devel zlib-devel libyaml-devel libffi-devel openssl-devel autoconf automake libtool bison # Used by the scripts Requires: sed grep tar gzip bzip2 make file # for OMF: Requires: libxml2 libxslt %description RVM is the Ruby Version Manager. It manages Ruby interpreter environments and switching between them. This package is meant for use by multiple users maintaining a shared copy of RVM. Users added to the '%{rvm_group}' group will be able to modify all aspects of RVM. These users will also have their default umask modified ("g+w") to allow group write permission (usually resulting in a umask of "0002") in order to ensure correct permissions for the shared RVM content. RVM is activated for all logins by default. To disable remove %{_sysconfdir}/profile.d/rvm.sh and source rvm from each users shell. %install rm -rf %{buildroot} # Clean the env for i in $(env | grep ^rvm_ | cut -d"=" -f1); do unset $i; done # Install everything into one directory ( export rvm_ignore_rvmrc=1 \ rvm_user_install_flag=0 \ rvm_path="%{buildroot}%{rvm_dir}" \ rvm_man_path="%{buildroot}%{_mandir}" \ HOME=%{buildroot} \curl -L https://get.rvm.io | bash -s stable --version %{version} ) # So members of the rvm group can write to it find %{buildroot}%{rvm_dir} -exec chmod ug+w {} \; find %{buildroot}%{rvm_dir} -type d -exec chmod g+s {} \; mkdir -p %{buildroot}%{_sysconfdir} # We use selfcontained so binaries end up in rvm/bin cat > %{buildroot}%{_sysconfdir}/rvmrc < %{buildroot}%{_sysconfdir}/profile.d/rvm.sh </dev/null || groupadd -r %{rvm_group} exit 0 %files %defattr(-,root,root) %config(noreplace) /etc/rvmrc %config(noreplace) /etc/profile.d/rvm.sh %attr(-,root,%{rvm_group}) %{rvm_dir} %{_mandir}/man1/* %changelog * Fri Sep 20 2013 Thierry Parmentelat - rvm-ruby-1.22.9-1 - move to version 1.22.9 * Sun Jul 14 2013 Thierry Parmentelat - rvm-ruby-1.20.10-8 - create an omf gemset (in rvm-ruby-1.20.10-7) - make omf the default gemset - add libxml2 and lixslt dependencies for omf * Tue Jun 25 2013 Thierry Parmentelat - rvm-ruby-1.20.10-6 - add omf-rc in the mix * Fri May 18 2013 Christoph Dwertmann - 4.xxx - downloads RVM instead of relying on local sources - works with latest RVM and Fedora - removed ruby build dependency - no more clashing with distribution ruby * Fri Mar 30 2012 Alexandre Fouche - 3.xxx Add some rubies and gems to compile: - 1.9.2-p290 + bundler, bluepill, whenever - 1.9.3-p0 + bundler, bluepill, whenever * Thu Mar 29 2012 Alexandre Fouche - 2.xxx - Adapt to make it work from RVM git source directly - Strip binaries, libraries, ... * Thu Mar 29 2012 Alexandre Fouche - 1.xxx - Adapt to make it work from RVM git source directly * Tue Dec 13 2011 Matthew Kent - 1.10.0-2 - New upstream release - Drop rvm_prefix - Rename rvm_user_install to rvm_user_install_flag - Rename rake wrapper to rvm-rake - Add file dependency * Thu Aug 4 2011 Matthew Kent - 1.6.32-1 - New upstream release * Tue Apr 19 2011 Matthew Kent - 1.6.3-1 - Initial package based off Gentoo work