b3a6b1d
%globa gem_name sequel
4cb56ef
%global gem_dir /usr/share/gems 
4cb56ef
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} 
4cb56ef
%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec 
4cb56ef
%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem 
4cb56ef
%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
Summary: The Database Toolkit for Ruby
204fcb0
Name: rubygem-%{gem_name}
be32c73
Version: 4.13.0
b3a6b1d
Release: 9%{?dist}
Alejandro Pérez e2994e7
Group: Development/Languages
Alejandro Pérez e2994e7
License: MIT
Alejandro Pérez e2994e7
URL: http://sequel.rubyforge.org
204fcb0
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
Alejandro Pérez e2994e7
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b3a6b1d
Requires: ruby(abi)
204fcb0
Requires: ruby(rubygems)
alejandro 5a0526b
BuildRequires: ruby-devel
alejandro c70f438
BuildRequires: ruby(rubygems)
Alejandro Pérez e2994e7
BuildArch: noarch
204fcb0
Provides: rubygem(%{gem_name}) = %{version}
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%description
Alejandro Pérez e2994e7
The Database Toolkit for Ruby
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%package doc
Alejandro Pérez e2994e7
Summary: Documentation for %{name}
Alejandro Pérez e2994e7
Group: Documentation
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
Requires: %{name} = %{version}-%{release}
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%description doc
Alejandro Pérez e2994e7
This package contains documentation for %{name}.
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%prep
alejandro 364b90c
gem unpack %{SOURCE0}
alejandro 364b90c
%setup -q -D -T -n %{gem_name}-%{version}
alejandro 364b90c
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%build
alejandro 364b90c
mkdir -p ./%{gem_dir}
alejandro 364b90c
gem build %{gem_name}.gemspec
alejandro 364b90c
#buildroot in %%install 
alejandro 364b90c
gem install -V \
alejandro 364b90c
        --local \
alejandro 364b90c
        --install-dir ./%{gem_dir} \
alejandro 364b90c
        --force \
alejandro 364b90c
        --rdoc  \
alejandro 364b90c
        %{gem_name}-%{version}.gem
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%install
204fcb0
mkdir -p %{buildroot}%{gem_dir}
alejandro 364b90c
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
4cb56ef
chmod a+x %{buildroot}%{gem_instdir}/bin/sequel
463b859
mkdir -p %{buildroot}%{gem_dir}/bin
4cb56ef
cp -a %{buildroot}%{gem_instdir}/bin/sequel %{buildroot}%{gem_dir}/bin
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%clean
Alejandro Pérez e2994e7
rm -rf %{buildroot}
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%files
Alejandro Pérez e2994e7
%defattr(-, root, root, -)
4cb56ef
%{_prefix}/share/gems/bin/sequel
4cb56ef
%{gem_instdir}
b6e5b16
/%{gem_cache}
b6e5b16
/%{gem_spec}
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%files doc
Alejandro Pérez e2994e7
%defattr(-, root, root, -)
204fcb0
%doc %{gem_docdir}
Alejandro Pérez e2994e7
Alejandro Pérez e2994e7
%changelog
b3a6b1d
* Tue Sep  2 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-9
b3a6b1d
- added release ab instead of release
4cb56ef
* Thu Aug 21 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-8
4cb56ef
- added variables for epel
4cb56ef
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-7
4cb56ef
- files issue
b6e5b16
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-6
b6e5b16
- added / on missing to fix File must begin with "/" 
dfd34b0
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-5
dfd34b0
- removed old doc
dfd34b0
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-4
463b859
- fix chmod access for db2_spec.rb
463b859
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-3
a6b9fab
- remove ilegal char
d2adf38
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-2
6a7f00b
- removed release dependency
d2adf38
* Fri Aug 15 2014 Alejandro Pérez <aeperezt@fedoraproject.org> - 4.13.0-1
Alejandro Pérez e2994e7
- Initial package