File perl-DBD-Pg.spec of Package perl-DBD-Pg
#
# spec file for package perl-DBD-Pg (Version 2.17.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-DBD-Pg
%define cpan_name DBD-Pg
Summary: PostgreSQL database driver for the DBI module
Version: 2.17.2
Release: 2
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/DBD-Pg/
#Source: http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.17.2.tar.gz
Source: %{cpan_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: openssl-devel
## TestSuite broken for postgresql < 8.4
## undefined symbol: lo_import_with_oid
# https://rt.cpan.org/Public/Bug/Display.html?id=56363
#BuildRequires: postgresql-devel >= 8.4
# fixed since 2.17.1
BuildRequires: postgresql-devel >= 7.4
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Test::More) >= 0.61
BuildRequires: perl(DBI) >= 1.52
BuildRequires: perl(version)
#
#BuildRequires: perl(Cwd)
#BuildRequires: perl(File::Comments)
#BuildRequires: perl(File::Comments::Plugin::C)
#BuildRequires: perl(File::Temp)
#BuildRequires: perl(Module::Signature) >= 0.50
#BuildRequires: perl(Perl::Critic)
#BuildRequires: perl(Pod::Spell)
#BuildRequires: perl(Test::Pod) >= 0.95
#BuildRequires: perl(Test::Pod::Coverage)
#BuildRequires: perl(Test::Warn) >= 0.08
#BuildRequires: perl(Test::YAML::Meta) >= 0.03
#BuildRequires: perl(Text::SpellChecker)
#
Requires: perl(DBI) >= 1.52
Requires: perl(version)
#
#Recommends: perl(Cwd)
#Recommends: perl(File::Comments)
#Recommends: perl(File::Comments::Plugin::C)
#Recommends: perl(File::Temp)
#Suggests: perl(Module::Signature) >= 0.50
#Suggests: perl(Perl::Critic)
#Suggests: perl(Pod::Spell)
#Suggests: perl(Test::Pod) >= 0.95
#Suggests: perl(Test::Pod::Coverage)
#Suggests: perl(Test::Warn) >= 0.08
#Suggests: perl(Test::YAML::Meta) >= 0.03
#Recommends: perl(Text::SpellChecker)
%description
DBD::Pg is a Perl module that works with the DBI module to provide access
to PostgreSQL databases.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
export POSTGRES_INCLUDE=/usr/include/pgsql
export POSTGRES_LIB="%{_libdir} -lssl"
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
### since 11.4 perl_process_packlist
### removes .packlist, perllocal.pod files
%if 0%{?suse_version} > 1130
%perl_process_packlist
%else
# do not perl_process_packlist
# remove .packlist file
%{__rm} -f $RPM_BUILD_ROOT%perl_vendorarch/auto/DBD/Pg/.packlist
# remove perllocal.pod file
%{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod
%endif
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes README SIGNATURE TODO
%changelog