diff --git a/pg-1.2.3.gem b/pg-1.2.3.gem deleted file mode 100644 index 0a019bf..0000000 Binary files a/pg-1.2.3.gem and /dev/null differ diff --git a/pg-1.4.5-spec.tar.gz b/pg-1.4.5-spec.tar.gz new file mode 100644 index 0000000..0c18537 Binary files /dev/null and b/pg-1.4.5-spec.tar.gz differ diff --git a/pg-1.4.5.gem b/pg-1.4.5.gem new file mode 100644 index 0000000..a7b603c Binary files /dev/null and b/pg-1.4.5.gem differ diff --git a/rubygem-pg-0.17.1-remove-rpath.patch b/rubygem-pg-0.17.1-remove-rpath.patch deleted file mode 100644 index d947016..0000000 --- a/rubygem-pg-0.17.1-remove-rpath.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/ext/extconf.rb b/ext/extconf.rb ---- a/ext/extconf.rb -+++ b/ext/extconf.rb -@@ -33,13 +33,6 @@ - incdir = `"#{pgconfig}" --includedir`.chomp - libdir = `"#{pgconfig}" --libdir`.chomp - dir_config 'pg', incdir, libdir -- -- # Try to use runtime path linker option, even if RbConfig doesn't know about it. -- # The rpath option is usually set implicit by dir_config(), but so far not -- # on MacOS-X. -- if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', " -Wl,-rpath,#{libdir}") -- $LDFLAGS << " -Wl,-rpath,#{libdir}" -- end - else - $stderr.puts "No pg_config... trying anyway. If building fails, please try again with", - " --with-pg-config=/path/to/pg_config" diff --git a/rubygem-pg-1.3.0-remove-rpath.patch b/rubygem-pg-1.3.0-remove-rpath.patch new file mode 100644 index 0000000..d725b9b --- /dev/null +++ b/rubygem-pg-1.3.0-remove-rpath.patch @@ -0,0 +1,17 @@ +diff --git a/ext/extconf.rb b/ext/extconf.rb +--- a/ext/extconf.rb ++++ b/ext/extconf.rb +@@ -52,13 +52,6 @@ + else + incdir, libdir = dir_config 'pg' + dlldir = libdir +- end +- +- # Try to use runtime path linker option, even if RbConfig doesn't know about it. +- # The rpath option is usually set implicit by dir_config(), but so far not +- # on MacOS-X. +- if dlldir && RbConfig::CONFIG["RPATHFLAG"].to_s.empty? +- append_ldflags "-Wl,-rpath,#{dlldir.quote}" + end + end + diff --git a/rubygem-pg.spec b/rubygem-pg.spec index 4740110..3278f12 100644 --- a/rubygem-pg.spec +++ b/rubygem-pg.spec @@ -2,22 +2,22 @@ %global gem_name pg Name: rubygem-%{gem_name} -Version: 1.2.3 +Version: 1.4.5 Release: 1 Summary: A Ruby interface to the PostgreSQL RDBMS -# Upstream license clarification (https://bitbucket.org/ged/ruby-pg/issue/72/) -# -# The portions of the code that are BSD-licensed are licensed under -# the BSD 3-Clause license; the contents of the BSD file are incorrect. -# License: (BSD or Ruby) and PostgreSQL URL: https://github.com/ged/ruby-pg Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# git clone --no-checkout https://github.com/ged/ruby-pg.git +# git -C ruby-pg archive -v -o pg-1.4.5-spec.tar.gz v1.4.5 spec/ +Source1: %{gem_name}-%{version}-spec.tar.gz # Disable RPATH. -# https://bitbucket.org/ged/ruby-pg/issue/183 -Patch0: rubygem-pg-0.17.1-remove-rpath.patch -# Required in ext/pg_text_decoder.c +# https://github.com/ged/ruby-pg/issues/183 +Patch0: rubygem-pg-1.3.0-remove-rpath.patch +# ext/pg_text_decoder.c Requires: rubygem(bigdecimal) +# lib/pg/text_{de,en}coder.rb +Requires: rubygem(json) BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-devel @@ -31,7 +31,7 @@ BuildRequires: rubygem(rspec) %description This is the extension library to access a PostgreSQL database from Ruby. -This library works with PostgreSQL 9.1 and later. +This library works with PostgreSQL 9.3 and later. %package doc @@ -43,7 +43,7 @@ BuildArch: noarch Documentation for %{name}. %prep -%setup -q -n %{gem_name}-%{version} +%setup -q -n %{gem_name}-%{version} -b 1 %patch0 -p1 @@ -66,18 +66,11 @@ cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri} # Prevent dangling symlink in -debuginfo (rhbz#878863). rm -rf %{buildroot}%{gem_instdir}/ext/ -# Remove useless shebangs. -sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_instdir}/Rakefile -sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_instdir}/Rakefile.cross - -# Files under %%{gem_libdir} are not executable. -for file in `find %{buildroot}%{gem_libdir} -type f -name "*.rb"`; do - sed -i '/^#!\/usr\/bin\/env/ d' $file \ - && chmod -v 644 $file -done %check pushd .%{gem_instdir} +ln -s %{_builddir}/spec . + # Set --verbose to show detail log by $VERBOSE. # See https://github.com/ged/ruby-pg/blob/master/spec/helpers.rb $VERBOSE # Assign a random port to consider a case of multi builds in parallel in a host. @@ -94,7 +87,7 @@ popd %files %dir %{gem_instdir} %{gem_extdir_mri} -%exclude %{gem_instdir}/.gemtest +%exclude %{gem_instdir}/.* %license %{gem_instdir}/BSDL %license %{gem_instdir}/POSTGRES %license %{gem_instdir}/LICENSE @@ -104,8 +97,8 @@ popd %files doc %doc %{gem_docdir} -%doc %{gem_instdir}/ChangeLog %doc %{gem_instdir}/Contributors.rdoc +%{gem_instdir}/Gemfile %doc %{gem_instdir}/History.rdoc %doc %{gem_instdir}/Manifest.txt %doc %{gem_instdir}/README-OS_X.rdoc @@ -113,8 +106,15 @@ popd %doc %{gem_instdir}/README.ja.rdoc %doc %{gem_instdir}/README.rdoc %{gem_instdir}/Rakefile* -%{gem_instdir}/spec +%{gem_instdir}/rakelib/* +%{gem_instdir}/certs +%{gem_instdir}/misc +%{gem_instdir}/pg.gemspec +%{gem_instdir}/sample %changelog +* Thu Aug 10 2023 wubijie - 1.4.5-1 +- Upgrade to version 1.4.5 + * Thu Mar 3 2022 caodongxia - 1.2.3-1 - Init package