Binary extension moved into ruby_sitearch dir.

-doc subpackage made architecture independent.
This commit is contained in:
Vít Ondruch 2011-06-03 18:55:57 +02:00
parent fb8874fa9a
commit 4e7965c157

View File

@ -2,12 +2,13 @@
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemname pg %global gemname pg
%global geminstdir %{gemdir}/gems/%{gemname}-%{version} %global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
%global rubyabi 1.8 %global rubyabi 1.8
Summary: A Ruby interface to the PostgreSQL RDBMS Summary: A Ruby interface to the PostgreSQL RDBMS
Name: rubygem-%{gemname} Name: rubygem-%{gemname}
Version: 0.11.0 Version: 0.11.0
Release: 3%{?dist} Release: 4%{?dist}
Group: Development/Languages Group: Development/Languages
# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/) # Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/)
# #
@ -36,7 +37,8 @@ This library works with PostgreSQL 7.4 and later.
%package doc %package doc
Summary: Documentation for %{name} Summary: Documentation for %{name}
Group: Documentation Group: Documentation
Requires:%{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc %description doc
Documentation for %{name} Documentation for %{name}
@ -55,6 +57,9 @@ mkdir -p %{buildroot}%{gemdir}
cp -a .%{gemdir}/* \ cp -a .%{gemdir}/* \
%{buildroot}%{gemdir}/ %{buildroot}%{gemdir}/
install -d -m0755 %{buildroot}%{ruby_sitearch}
mv %{buildroot}%{geminstdir}/lib/pg_ext.so %{buildroot}%{ruby_sitearch}/
# Remove the binary extension sources and build leftovers. # Remove the binary extension sources and build leftovers.
rm -rf %{buildroot}%{geminstdir}/ext rm -rf %{buildroot}%{geminstdir}/ext
@ -77,6 +82,7 @@ rspec spec
popd popd
%files %files
%{ruby_sitearch}/pg_ext.so
%dir %{geminstdir} %dir %{geminstdir}
%doc %{geminstdir}/BSD %doc %{geminstdir}/BSD
%doc %{geminstdir}/GPL %doc %{geminstdir}/GPL
@ -100,8 +106,12 @@ popd
%changelog %changelog
* Fri Jun 03 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-4
- Binary extension moved into ruby_sitearch dir.
- -doc subpackage made architecture independent.
* Wed Jun 01 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-3 * Wed Jun 01 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-3
- Quoted upstredam license clarification. - Quoted upstream license clarification.
* Mon May 30 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-2 * Mon May 30 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-2
- Removed/fixed shebang in non-executables. - Removed/fixed shebang in non-executables.