[rubygem-pg] Binary extension moved into ruby_sitearch dir. -doc subpackage made architecture independent.

Vít Ondruch vondruch at fedoraproject.org
Fri Jun 3 16:58:54 UTC 2011


commit 4e7965c15792aa4d71fda2ddfcb17f5d813ccf3c
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Fri Jun 3 18:55:57 2011 +0200

    Binary extension moved into ruby_sitearch dir.
    -doc subpackage made architecture independent.

 rubygem-pg.spec |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/rubygem-pg.spec b/rubygem-pg.spec
index a8b6d69..67b0248 100644
--- a/rubygem-pg.spec
+++ b/rubygem-pg.spec
@@ -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 at 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 at redhat.com> - 0.11.0-3
-- Quoted upstredam license clarification.
+- Quoted upstream license clarification.
 
 * Mon May 30 2011 Vít Ondruch <vondruch at redhat.com> - 0.11.0-2
 - Removed/fixed shebang in non-executables.


More information about the scm-commits mailing list