diff options
author | Ken Dreyer <ktdreyer@ktdreyer.com> | 2013-02-16 23:09:01 -0700 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2013-02-16 23:09:01 -0700 |
commit | 06c14679e6d311f0921d90a1e71ae9c675308d08 (patch) | |
tree | 1a55c58e9238f5fdb63cabaf784c44a39f208da3 | |
parent | a01ff3246d44136abfc2b601e0ca69d9ab73e7ef (diff) | |
download | rubygem-mysql2-06c14679e6d311f0921d90a1e71ae9c675308d08.tar.gz rubygem-mysql2-06c14679e6d311f0921d90a1e71ae9c675308d08.tar.xz rubygem-mysql2-06c14679e6d311f0921d90a1e71ae9c675308d08.zip |
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | rubygem-mysql2.spec | 19 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 19 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e573cb7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mysql2-0.3.11.gem diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 963e17f..0232983 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -9,7 +9,7 @@ Summary: A simple, fast Mysql library for Ruby, binding to libmysql Name: rubygem-%{gem_name} Version: 0.3.11 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Languages License: MIT URL: http://github.com/brianmario/mysql2 @@ -37,6 +37,7 @@ Provides: rubygem(%{gem_name}) = %{version} %{!?gem_spec: %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec} %{!?gem_docdir: %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}} %{!?gem_extdir: %global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}} +%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')} %description The Mysql2 gem is meant to serve the extremely common use-case of @@ -78,9 +79,16 @@ mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ +%if 0%{?el6} +# gem_extdir doesn't really work on EL 6 +mkdir -p %{buildroot}%{ruby_sitearch}/mysql2 +# move the extension to ruby_sitearch +mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{ruby_sitearch}/mysql2 +%else mkdir -p %{buildroot}%{gem_extdir}/lib/mysql2 -# move the extension +# move the extension to gem_extdir mv %{buildroot}%{gem_instdir}/lib/mysql2/mysql2.so %{buildroot}%{gem_extdir}/lib/mysql2 +%endif # Remove the binary extension sources and build leftovers. rm -rf %{buildroot}%{gem_instdir}/ext @@ -101,7 +109,11 @@ popd %files %dir %{gem_instdir} %{gem_libdir} +%if 0%{?el6} +%{ruby_sitearch}/%{gem_name} +%else %{gem_extdir} +%endif %exclude %{gem_cache} %{gem_spec} @@ -118,6 +130,9 @@ popd %{gem_instdir}/tasks %changelog +* Fri Feb 15 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.3.11-3 +- Binary extension moved into ruby_sitearch dir + * Thu Feb 14 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.3.11-2 - RHEL 6 compatibility @@ -0,0 +1 @@ +671541cecf575cefb686b7ac49d32bd4 mysql2-0.3.11.gem |