3 %bcond_without doc # don't build ri/rdoc
5 Summary: MySQL module for Ruby
6 Summary(pl.UTF-8): Moduł MySQL dla języka Ruby
11 Group: Development/Languages
12 Source0: http://tmtm.org/downloads/mysql/ruby/%{name}-%{version}.tar.gz
13 # Source0-md5: eb998b89b7e391cffe0a1f84bd426f9b
14 Patch0: %{name}-amd64.patch
15 Patch1: %{name}-encoding.patch
16 Patch2: rbconfig-deprecation.patch
17 URL: http://www.tmtm.org/mysql/ruby/README.html
18 BuildRequires: mysql-devel
19 BuildRequires: rpm-rubyprov
20 BuildRequires: rpmbuild(macros) >= 1.665
21 BuildRequires: ruby >= 1:1.8.6
22 BuildRequires: ruby-devel
23 BuildRequires: ruby-modules
24 Provides: ruby-mysql-library
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 MySQL module for Ruby.
31 %description -l pl.UTF-8
32 Moduł MySQL dla języka Ruby.
35 Summary: HTML documentation for %{name}
36 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{name}
38 Requires: ruby >= 1:1.8.7-4
39 %if "%{_rpmversion}" >= "5"
44 HTML documentation for %{name}.
46 %description rdoc -l pl.UTF-8
47 Dokumentacja w formacie HTML dla %{name}.
50 Summary: ri documentation for %{name}
51 Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{name}
54 %if "%{_rpmversion}" >= "5"
59 ri documentation for %{name}.
61 %description ri -l pl.UTF-8
62 Dokumentacji w formacie ri dla %{name}.
70 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
78 CFLAGS="%{rpmcflags} -fPIC"
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}}
93 archdir=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \
94 sitearchdir=$RPM_BUILD_ROOT%{ruby_vendorarchdir}
97 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
98 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
102 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
107 %attr(755,root,root) %{ruby_vendorarchdir}/mysql.so
111 %defattr(644,root,root,755)
112 %{ruby_rdocdir}/%{name}-%{version}
115 %defattr(644,root,root,755)
117 %{ruby_ridir}/TC_Mysql*