Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 1eb4e133a08098364b302cefbb25a29c > files > 3

perl-DBD-PgSPI-0.02-2mdk.src.rpm

%define module  DBD-PgSPI
%define	name	perl-%{module}
%define	version	0.02
%define	release	%mkrel 2
%define	pdir	DBD-PgSPI

Summary:	PL/Perl PostgreSQL database driver for the DBI module
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL or Artistic
Group:		Development/Perl
Source0:	ftp://ftp.perl.org/pub/CPAN/modules/by-module/%{pdir}/%{module}-%{version}.tar.bz2
Patch0:		perl-%{module}.includedir.patch.bz2
Url:		http://search.cpan.org/search?dist=%{module}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:	perl-devel 
BuildRequires:  perl-DBI
BuildRequires:  postgresql-devel

%description
DBD::PgSPI is a Perl module which works with the DBI module to provide access
to PostgreSQL database from within pl/perl functions inside the database.

If you are looking for a way to access postgresql database from a perl script
running outside of your database, look at DBD::Pg, you cannot use this module.
This module is only intended for use by stored procedures written in 'plperl'
programming language running inside PostgreSQL.

%prep
%setup -q -n %{module}-%{version}
%patch0 -p0 -b .includedir

%build
export POSTGRES_HOME=%_includedir/pgsql
CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor
%make

# Skipping make test, because it try to connect to a local DB
# make test

%install
rm -rf $RPM_BUILD_ROOT
%{makeinstall_std}

%clean 
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc README 
%{_mandir}/man*/*
%{perl_vendorlib}/*

%changelog
* Sun Mar 13 2005 Olivier Thauvin <nanardon@mandrake.org> 0.02-2mdk
- BuildRequires

* Sat Mar 12 2005 Olivier Thauvin <nanardon@mandrake.org> 0.02-1mdk
- make a specfile