1 Summary: Simple per-user Ruby version manager
6 Group: Development/Tools
7 Source0: https://github.com/sstephenson/rbenv/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 3e2caffc7aece5e706b82bbb7dc6997b
9 URL: https://github.com/sstephenson/rbenv
11 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13 %define _appdir %{_datadir}/%{name}
16 rbenv lets you easily switch between multiple versions of Ruby. It's
17 simple, unobtrusive, and follows the UNIX tradition of single-purpose
18 tools that do one thing well.
20 %package -n bash-completion-%{name}
21 Summary: bash completion for rbenv
22 Group: Applications/Shells
23 Requires: %{name} = %{version}-%{release}
24 Requires: bash-completion
26 %description -n bash-completion-%{name}
27 This package provides bash completion scripts for rbenv
30 Summary: zsh completion for rbenv
31 Group: Applications/Shells
32 Requires: %{name} = %{version}-%{release}
36 This package provides zsh completion scripts for rbenv
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
44 install -p libexec/* $RPM_BUILD_ROOT%{_datadir}/%{name}
46 install -d $RPM_BUILD_ROOT%{_bindir}
47 ln -s %{_datadir}/%{name}/rbenv $RPM_BUILD_ROOT%{_bindir}/rbenv
48 install -p bin/ruby-local-exec $RPM_BUILD_ROOT%{_bindir}/ruby-local-exec
50 install -d $RPM_BUILD_ROOT{/etc/bash_completion.d,%{_datadir}/zsh/site-functions}
51 install -p completions/rbenv.bash $RPM_BUILD_ROOT/etc/bash_completion.d/rbenv
52 install -p completions/rbenv.zsh $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/rbenv
55 %banner %{name} -e -o <<'EOF'
56 You probably want to execute the following line to add rbenv to your shell:
58 echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
66 %doc README.md LICENSE
67 %attr(755,root,root) %{_bindir}/rbenv
68 %attr(755,root,root) %{_bindir}/ruby-local-exec
69 %dir %{_datadir}/%{name}
70 %attr(755,root,root) %{_datadir}/%{name}/rbenv*
72 %files -n bash-completion-%{name}
73 %defattr(644,root,root,755)
74 /etc/bash_completion.d/rbenv
77 %defattr(644,root,root,755)
78 %{_datadir}/zsh/site-functions/rbenv