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 gemname pg
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
%global rubyabi 1.8
Summary: A Ruby interface to the PostgreSQL RDBMS
Name: rubygem-%{gemname}
Version: 0.11.0
Release: 3%{?dist}
Release: 4%{?dist}
Group: Development/Languages
# 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
Summary: Documentation for %{name}
Group: Documentation
Requires:%{name} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}
@ -55,6 +57,9 @@ mkdir -p %{buildroot}%{gemdir}
cp -a .%{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.
rm -rf %{buildroot}%{geminstdir}/ext
@ -77,6 +82,7 @@ rspec spec
popd
%files
%{ruby_sitearch}/pg_ext.so
%dir %{geminstdir}
%doc %{geminstdir}/BSD
%doc %{geminstdir}/GPL
@ -100,8 +106,12 @@ popd
%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
- Quoted upstredam license clarification.
- Quoted upstream license clarification.
* Mon May 30 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-2
- Removed/fixed shebang in non-executables.