summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2012-08-04 11:56:34 -0600
committerKen Dreyer <ktdreyer@ktdreyer.com>2012-08-04 11:56:34 -0600
commitd165c54c11c39e802d68e0df20822f1faa91772b (patch)
tree4e70964a8d1bb92f0f058c77b63beae1556e189e
downloadrubygem-mysql2-d165c54c11c39e802d68e0df20822f1faa91772b.tar.gz
rubygem-mysql2-d165c54c11c39e802d68e0df20822f1faa91772b.tar.xz
rubygem-mysql2-d165c54c11c39e802d68e0df20822f1faa91772b.zip
Initial package, created by gem2rpm 0.8.1
-rw-r--r--rubygem-mysql2.spec105
1 files changed, 105 insertions, 0 deletions
diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec
new file mode 100644
index 0000000..9880b00
--- /dev/null
+++ b/rubygem-mysql2.spec
@@ -0,0 +1,105 @@
+# Generated from mysql2-0.3.11.gem by gem2rpm -*- rpm-spec -*-
+%global gem_name mysql2
+%global rubyabi 1.9.1
+
+Summary: A simple, fast Mysql library for Ruby, binding to libmysql
+Name: rubygem-%{gem_name}
+Version: 0.3.11
+Release: 1%{?dist}
+Group: Development/Languages
+License: MIT
+URL: http://github.com/brianmario/mysql2
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+Requires: ruby(abi) = %{rubyabi}
+Requires: ruby(rubygems)
+BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: ruby-devel
+BuildRequires: rubygems-devel
+BuildRequires: mysql-devel
+BuildRequires: mysql-server
+BuildRequires: rubygem(eventmachine)
+BuildRequires: rubygem(rspec)
+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
+%setup -q -c -T
+mkdir -p .%{gem_dir}
+export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+gem install --local --install-dir .%{gem_dir} \
+ -V \
+ --force %{SOURCE0}
+
+# Remove developer files
+rm -rf .%{gem_instdir}/.gitignore
+rm -rf .%{gem_instdir}/.rspec
+rm -rf .%{gem_instdir}/.rvmrc
+rm -rf .%{gem_instdir}/.travis.yml
+# Remove extra gemspec file
+rm -rf .%{gem_instdir}/%{gem_name}.gemspec
+
+%build
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+mkdir -p %{buildroot}%{gem_extdir}/lib/mysql2
+# move the extension
+mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir}/lib/mysql2
+
+# Remove the binary extension sources and build leftovers.
+rm -rf %{buildroot}%{gem_instdir}/ext
+
+%check
+pushd .%{gem_instdir}
+ # From README.md:
+ # The tests require the "test" database to exist, and expect to connect both
+ # as root and the running user, both with a blank password:
+ # CREATE DATABASE test;
+ # CREATE USER '<user>'@'localhost' IDENTIFIED BY '';
+ # GRANT ALL PRIVILEGES ON test.* TO '<user>'@'localhost';
+ # I'm punting on this for Fedora.
+ #rspec -Ilib spec
+popd
+
+
+%files
+%dir %{gem_instdir}
+%{gem_libdir}
+%{gem_extdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/CHANGELOG.md
+%doc %{gem_instdir}/MIT-LICENSE
+%doc %{gem_instdir}/README.md
+%{gem_instdir}/Gemfile
+%{gem_instdir}/Rakefile
+%{gem_instdir}/benchmark
+%{gem_instdir}/examples
+%{gem_instdir}/spec
+%{gem_instdir}/tasks
+
+%changelog
+* Sat Aug 04 2012 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.3.11-1
+- Initial package, created by gem2rpm 0.8.1