%global gitdate 20140410

Summary: Plugin for rbenv that adds basic gemset support
Summary(ja): rbenv 用の gemset サポートプラグイン
Name: rbenv-gemset
Version: 0.5.6.%{gitdate}
Release: 1%{?_dist_release}
License: MIT
Group: Development/Tools
URL: https://github.com/jamis/rbenv-gemset/
Source0: %{name}-%{version}.tar.xz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires: rbenv

Distribution: Vine Linux
Vendor: Project Vine
Packager: daisuke

%description
rbenv-gemset is an extension for the rbenv ruby version manager that
allows you to use "gemsets", sandboxed collections of gems. This lets
you have multiple collections of gems installed in different
sandboxes, and specify (on a per-application basis) which sets of gems
should be used.

%prep
%setup -q

%build

sed -i -e 's|/usr/local/share/ruby-gemsets|/usr/share/rbenv|g' libexec/rbenv-gemset

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_sysconfdir}/rbenv.d
cp -a etc/rbenv.d/* %{buildroot}%{_sysconfdir}/rbenv.d/

mkdir -p %{buildroot}%{_datadir}/rbenv/libexec
cp -a libexec/* %{buildroot}%{_datadir}/rbenv/libexec/

mkdir -p %{buildroot}%{_bindir}
ln -s %{_datadir}/rbenv/libexec/rbenv-gemset %{buildroot}%{_bindir}/rbenv-gemset

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc README.mkd
%{_sysconfdir}/rbenv.d/*/*
%{_bindir}/rbenv-gemset
%{_datadir}/rbenv

%changelog
* Thu Apr 10 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.6.20140410-1
- update to new git master

* Tue Dec 03 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.0.20131203-1
- update to new git master

* Fri Jul 13 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.3.0.20120606-1
- initial build for Vine Linux
