158 lines
4.8 KiB
RPMSpec
158 lines
4.8 KiB
RPMSpec
# Generated from pg-0.11.0.gem by gem2rpm -*- rpm-spec -*-
|
|
%global gem_name pg
|
|
|
|
Summary: A Ruby interface to the PostgreSQL RDBMS
|
|
Name: rubygem-%{gem_name}
|
|
Version: 0.14.1
|
|
Release: 2%{?dist}
|
|
Group: Development/Languages
|
|
# 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: http://bitbucket.org/ged/ruby-pg/
|
|
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
Patch0: rubygem-pg-0.15.0.pre.432-Adding-some-fixes-for-PostgreSQL-9.2.x.patch
|
|
Requires: ruby(release)
|
|
Requires: ruby(rubygems)
|
|
BuildRequires: ruby(release)
|
|
BuildRequires: ruby-devel
|
|
BuildRequires: rubygems-devel
|
|
BuildRequires: ruby
|
|
BuildRequires: postgresql-server postgresql-devel
|
|
BuildRequires: rubygem(rspec)
|
|
# Introduced in F17.
|
|
Obsoletes: ruby(postgres) <= 0.7.9-2010.01.28.2
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
|
|
|
%description
|
|
This is the extension library to access a PostgreSQL database from Ruby.
|
|
This library works with PostgreSQL 7.4 and later.
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Group: Documentation
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation for %{name}
|
|
|
|
|
|
%prep
|
|
%setup -q -c -T
|
|
%gem_install -n %{SOURCE0}
|
|
|
|
pushd .%{gem_instdir}
|
|
%patch0 -p1
|
|
popd
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
mkdir -p %{buildroot}%{gem_extdir_mri}/lib
|
|
cp -a .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
mv %{buildroot}%{gem_libdir}/pg_ext.so %{buildroot}%{gem_extdir_mri}/lib
|
|
|
|
# Remove the binary extension sources and build leftovers.
|
|
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}/sample/check_conn.rb
|
|
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_instdir}/Rakefile.cross
|
|
|
|
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_libdir}/pg.rb
|
|
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_libdir}/pg/constants.rb
|
|
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_libdir}/pg/result.rb
|
|
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_libdir}/pg/exceptions.rb
|
|
sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{gem_libdir}/pg/connection.rb
|
|
|
|
|
|
# Fix spec shebangs.
|
|
# https://bitbucket.org/ged/ruby-pg/issue/74/
|
|
for file in `find %{buildroot}%{gem_instdir}/spec -type f ! -perm /a+x -name "*.rb"`; do
|
|
[ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] \
|
|
&& sed -i -e 's/^#!\/usr\/bin\/env spec/#!\/usr\/bin\/env rspec/' $file \
|
|
&& chmod -v 755 $file
|
|
done
|
|
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
rspec spec
|
|
popd
|
|
|
|
%files
|
|
%exclude %{gem_instdir}/.gemtest
|
|
%{gem_extdir_mri}
|
|
%dir %{gem_instdir}
|
|
%doc %{gem_instdir}/BSDL
|
|
%doc %{gem_instdir}/POSTGRES
|
|
%doc %{gem_instdir}/LICENSE
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/ChangeLog
|
|
%doc %{gem_instdir}/Contributors.rdoc
|
|
%doc %{gem_instdir}/History.rdoc
|
|
%doc %{gem_instdir}/Manifest.txt
|
|
%{gem_instdir}/Rakefile
|
|
%{gem_instdir}/Rakefile.cross
|
|
%doc %{gem_instdir}/README.rdoc
|
|
%doc %{gem_instdir}/README.ja.rdoc
|
|
%doc %{gem_instdir}/README-OS_X.rdoc
|
|
%doc %{gem_instdir}/README-Windows.rdoc
|
|
%{gem_instdir}/sample
|
|
%{gem_instdir}/spec
|
|
|
|
|
|
%changelog
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.1-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Thu Mar 07 2013 Vít Ondruch <vondruch@redhat.com> - 0.14.1-1
|
|
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
|
|
- Update to pg 0.14.1.
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.2-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.2-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
* Tue Feb 07 2012 Vít Ondruch <vondruch@redhat.com> - 0.12.2-2
|
|
- Obsolete ruby-postgress, which was retired.
|
|
|
|
* 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
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
* Fri Jun 03 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-5
|
|
- Pass CFLAGS to extconf.rb.
|
|
|
|
* 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 upstream license clarification.
|
|
|
|
* Mon May 30 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-2
|
|
- Removed/fixed shebang in non-executables.
|
|
- Removed sources.
|
|
|
|
* Thu May 26 2011 Vít Ondruch <vondruch@redhat.com> - 0.11.0-1
|
|
- Initial package
|