File rubygem-mysql.spec of Package rubygem-mysql
#
# spec file for package rubygem-mysql
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: rubygem-mysql
Version: 2.9.0
Release: 0
%define mod_name mysql
#
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: rubygems_with_buildroot_patch
%rubygems_requires
#
Requires: ruby >= 1.8.7
BuildRequires: libmysqlclient-devel
BuildRequires: ruby-devel >= 1.8.6
Provides: ruby-mysql = %{version}
# make it < with the next version update
Obsoletes: ruby-mysql <= %{version}
#
Url: http://mysql-win.rubyforge.org
Source: %{mod_name}-%{version}.gem
#
Summary: This is the MySQL API module for Ruby
License: GPL-2.0+ or Ruby
Group: Development/Languages/Ruby
%description
This is the MySQL API module for Ruby. It provides the same functions for Ruby
programs that the MySQL C API provides for C programs.
This is a conversion of tmtm's original extension into a proper RubyGems.
%prep
%build
%install
%gem_install %{S:0}
%gem_cleanup
# fix shebang
# test_mysql.rb
sed -i -e "s@^#!/usr/local/bin/ruby@#!/usr/bin/ruby@" %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/test/test_%{mod_name}.rb
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_name}-%{version}.gem
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_name}-%{version}.gemspec
%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_name}-%{version}/
%changelog