Import rubygem-0.3.13

This commit is contained in:
Alexander Chernyakhovsky 2013-09-11 20:34:39 -04:00
parent effaeeb72e
commit e29980bac6
3 changed files with 94 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/mysql2-0.3.13.gem

92
rubygem-mysql2.spec Normal file
View File

@ -0,0 +1,92 @@
# Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*-
%global gem_name mysql2
Name: rubygem-%{gem_name}
Version: 0.3.13
Release: 1%{?dist}
Summary: A simple, fast Mysql library for Ruby, binding to libmysql
Group: Development/Languages
License: MIT
URL: http://github.com/brianmario/mysql2
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(release)
Requires: ruby(rubygems)
Requires: mariadb-libs
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby-devel
BuildRequires: rubygem(rspec)
BuildRequires: mariadb-devel
BuildRequires: mariadb-server
Provides: rubygem(%{gem_name}) = %{version}
%description
The Mysql2 gem is meant to serve the extremely common use-case of
connecting, querying and iterating on results. Some database libraries
out there serve as direct 1:1 mappings of the already complex C API\'s
available. This one is not.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
# Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{gem_extdir_mri}/lib/mysql2
mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir_mri}/lib/mysql2
# Remove some droppings
rm -f %{buildroot}%{gem_instdir}/{.gitignore,.rspec,.rvmrc,.travis.yml}
rm -rf %{buildroot}%{gem_instdir}/spec
%check
# We can't run the tests because they require a mysql instance. That's
# a bit much to require for builds. The following invocation is documentation
#systemctl start mysqld.service
#rspec -I%%{buildroot}%%{gem_extdir_mri}/lib/ spec
%files
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_instdir}/ext
%{gem_extdir_mri}
%exclude %{gem_cache}
%{gem_spec}
%exclude %{gem_instdir}/support
%doc %{gem_instdir}/MIT-LICENSE
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%{gem_instdir}/examples
%changelog
* Wed Sep 11 2013 Alexander Chernyakhovsky <achernya@mit.edu> - 0.3.13-1
- Initial package

View File

@ -0,0 +1 @@
ee8dfc03421a1db9f6147d2efde7ced8 mysql2-0.3.13.gem