[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PostgreSQL and Perl

I'm trying to find out what to do with this Perl library that PostgreSQL

The upstream Makefile.PL wants to put things into my own locations, and
I need to find out how to force things to debian/tmp... and what directory
under there I should put it in.

I ran this command to show the current paths as shown by the MakeMaker man

  $ perl '-V:install.*'

The Makefile is trying to put things in $installsitelib; is that OK for
the FSSTND?  (I think not, because no other package seems to use it;
as far as I can see similar stuff goes into /usr/lib/perl5.)

I see from the man page for MakeMaker that I can feed new variable values to
WriteMakefile(), but I'm not sure what effect this will have on Perl and I
really don't have time to find out.

How can I change this variable in a manner suitable for enclosing in a
Debian package?  (I attach the Makefile.PL file; if anyone
can suggest the necessary changes, I shall be grateful.)

# $Id: Makefile.PL,v 1.4 1997/09/25 21:14:41 mergl Exp $
# Copyright (c) 1997  Edmund Mergl

use ExtUtils::MakeMaker;
use Config;
use strict;

print "\nConfiguring Pg\n";
print "Remember to actually read the README file !\n";
die "\nYou didn't read the README file !\n" unless ($] >= 5.002);

    warn "\$POSTGRES_HOME not defined. Searching for PostgreSQL...\n";
    foreach(qw(/usr/local/pgsql /usr/pgsql /home/pgsql /opt/pgsql /usr/local/postgres /usr/postgres /home/postgres /opt/postgres)) {
        if (-d "$_/lib") {
            $ENV{POSTGRES_HOME} = $_;

if (-d "$ENV{POSTGRES_HOME}/lib" || $ENV{OVERRIDE}) {
#                                ^^^^^^^^^^^^^^^^^
# I put this bit in to stop it falling over because it couldn't find an
# already built and installed PostgreSQL - Oliver Elphick

    print "Found PostgreSQL in $ENV{POSTGRES_HOME}\n";
} else {
    die "Unable to determine PostgreSQL\n";

my %opts = (
    NAME         => 'Pg',
    VERSION_FROM => 'Pg.pm',
    INC	         =>  "-I$ENV{POSTGRES_HOME}/include -I../../include -I../libpq",
    LIBS         => ["-L$ENV{POSTGRES_HOME}/lib -L ../libpq -lpq"],



# end of Makefile.PL
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                                  http://lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1

Reply to: