Rebuilt for Ruby 1.9.3.

Upgrade to pg 0.12.2.
This commit is contained in:
Vít Ondruch 2012-01-24 12:36:05 +01:00
parent d466755883
commit c9cce211c1
3 changed files with 52 additions and 46 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/pg-0.11.0.gem /pg-0.11.0.gem
/pg-0.12.2.gem

View File

@ -1,14 +1,11 @@
# Generated from pg-0.11.0.gem by gem2rpm -*- rpm-spec -*- # Generated from pg-0.11.0.gem by gem2rpm -*- rpm-spec -*-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gem_name pg
%global gemname pg %global rubyabi 1.9.1
%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 Summary: A Ruby interface to the PostgreSQL RDBMS
Name: rubygem-%{gemname} Name: rubygem-%{gem_name}
Version: 0.11.0 Version: 0.12.2
Release: 6%{?dist} Release: 1%{?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/)
# #
@ -17,17 +14,18 @@ Group: Development/Languages
# #
License: (GPLv2 or Ruby) and BSD License: (GPLv2 or Ruby) and BSD
URL: http://bitbucket.org/ged/ruby-pg/ URL: http://bitbucket.org/ged/ruby-pg/
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Requires: ruby(abi) = %{rubyabi} Requires: ruby(abi) = %{rubyabi}
Requires: rubygems Requires: ruby(rubygems)
Requires: ruby Requires: ruby
BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygems BuildRequires: ruby-devel
BuildRequires: ruby ruby-devel BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: postgresql-server postgresql-devel BuildRequires: postgresql-server postgresql-devel
# Keep requiring rspec-core as long as rubygem(rspec) is provided by RSpec 1.x # Keep requiring rspec-core as long as rubygem(rspec) is provided by RSpec 1.x
BuildRequires: rubygem(rspec-core) BuildRequires: rubygem(rspec-core)
Provides: rubygem(%{gemname}) = %{version} Provides: rubygem(%{gem_name}) = %{version}
%description %description
This is the extension library to access a PostgreSQL database from Ruby. This is the extension library to access a PostgreSQL database from Ruby.
@ -46,67 +44,74 @@ Documentation for %{name}
%prep %prep
%setup -q -c -T %setup -q -c -T
mkdir -p .%{gemdir} mkdir -p .%{gem_dir}
export CONFIGURE_ARGS="--with-cflags='%{optflags}'" export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
gem install --local --install-dir .%{gemdir} \ gem install --local --install-dir .%{gem_dir} \
-V --force %{SOURCE0} -V --force %{SOURCE0}
%build %build
%install %install
mkdir -p %{buildroot}%{gemdir} mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gemdir}/* \ mkdir -p %{buildroot}%{gem_extdir}/lib
%{buildroot}%{gemdir}/ cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
install -d -m0755 %{buildroot}%{ruby_sitearch} mv %{buildroot}%{gem_libdir}/pg_ext.so %{buildroot}%{gem_extdir}/lib
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}%{gem_instdir}/ext
# Remove useless shebangs. # Remove useless shebangs.
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{geminstdir}/lib/pg.rb sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_libdir}/pg.rb
sed -i -e '/^#!rake/d' %{buildroot}%{geminstdir}/Rakefile sed -i -e '/^#!rake/d' %{buildroot}%{gem_instdir}/Rakefile
sed -i -e '/^#!rake/d' %{buildroot}%{geminstdir}/Rakefile.local
# Fix spec shebangs. # Fix spec shebangs.
# https://bitbucket.org/ged/ruby-pg/issue/74/ # https://bitbucket.org/ged/ruby-pg/issue/74/
for file in `find %{buildroot}%{geminstdir}/spec -type f ! -perm /a+x -name "*.rb"`; do for file in `find %{buildroot}%{gem_instdir}/spec -type f ! -perm /a+x -name "*.rb"`; do
[ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] \ [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] \
&& sed -i -e 's/^#!\/usr\/bin\/env spec/#!\/usr\/bin\/env rspec/' $file \ && sed -i -e 's/^#!\/usr\/bin\/env spec/#!\/usr\/bin\/env rspec/' $file \
&& chmod -v 755 $file && chmod -v 755 $file
done done
%check %check
pushd .%{geminstdir} pushd .%{gem_instdir}
rspec spec rspec spec
popd popd
%files %files
%{ruby_sitearch}/pg_ext.so %exclude %{gem_instdir}/.gemtest
%dir %{geminstdir} %{gem_extdir}
%doc %{geminstdir}/BSD %dir %{gem_instdir}
%doc %{geminstdir}/GPL %doc %{gem_instdir}/BSD
%doc %{geminstdir}/LICENSE %doc %{gem_instdir}/GPL
%{geminstdir}/lib %doc %{gem_instdir}/LICENSE
%{gemdir}/cache/%{gemname}-%{version}.gem %{gem_libdir}
%{gemdir}/specifications/%{gemname}-%{version}.gemspec %exclude %{gem_cache}
%{gem_spec}
%files doc %files doc
%doc %{gemdir}/doc/%{gemname}-%{version} %doc %{gem_docdir}
%doc %{geminstdir}/ChangeLog %doc %{gem_instdir}/ChangeLog
%doc %{geminstdir}/Contributors %doc %{gem_instdir}/Contributors.rdoc
%{geminstdir}/Rakefile %doc %{gem_instdir}/History.rdoc
%{geminstdir}/Rakefile.local %doc %{gem_instdir}/Manifest.txt
%doc %{geminstdir}/README %{gem_instdir}/Rakefile
%doc %{geminstdir}/README.ja %{gem_instdir}/Rakefile.cross
%doc %{geminstdir}/README.OS_X %doc %{gem_instdir}/README.rdoc
%doc %{geminstdir}/README.windows %doc %{gem_instdir}/README.ja.rdoc
%{geminstdir}/rake %doc %{gem_instdir}/README.OS_X.rdoc
%{geminstdir}/spec %doc %{gem_instdir}/README.windows.rdoc
%{gem_instdir}/misc
%{gem_instdir}/sample
%{gem_instdir}/spec
%changelog %changelog
* Tue Jan 24 2012 Vít Ondruch <vondruch@redhat.com> - 0.12.2-1
- Rebuilt for Ruby 1.9.3.
- Upgrade to pg 0.12.2.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.0-6 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

View File

@ -1 +1 @@
6b49ebda17f0313aa2bab19b9f0f735d pg-0.11.0.gem 765209bc586bb02a8814bd4342dd28f9 pg-0.12.2.gem