Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Perl library (was Building Postgres)

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Maarten Boekhold <boekhold(at)tibco(dot)com>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>, Edmund Mergl <E(dot)Mergl(at)bawue(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Cristian Gafton <gafton(at)redhat(dot)com>
Subject: Re: [HACKERS] Perl library (was Building Postgres)
Date: 1999-06-28 16:20:54
Message-ID: 199906281620.RAA15303@linda.lfix.co.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
Maarten Boekhold wrote:
  >
  >> I'm now trying to package the perl (and next, python) interfaces. Can
  >> someone with perl installation experience give me some hints on what
  >> actually needs to be installed and how it has to happen?
  >
  >Me thinks the guy who's building the Debian packages should have some
  >experience with these. IIRC that'd be Oliver Elphick (?).
  
The Perl package gave me the most trouble; the more so since I rarely
use Perl and only have the vaguest notion of what's going on in the pgperl
build!

Here are extracts from the Debian makefile:

HERE :=         $(shell pwd)
debtmp=         $(HERE)/debian/tmp   # pgperl package gets put in 
                                     # $(debtmp)/../libpgperl

src/config.cache:
        cd src &&\
            echo /usr/include/ncurses /usr/include/readline | \
            ./configure --prefix=$(HERE)/debian/tmp/usr/lib/postgresql \
            --with-template=$(TEMPLATE) \
            --with-tcl \
            --enable-locale \
            --with-pgport=5432

perl-config: src/config.cache
            cd src/interfaces/perl5 && \
                INSTALLDIRS=perl \
                        PREFIX=$(debtmp)/usr \
                        POSTGRES_HOME=$(debtmp)/usr/lib/postgresql \
                        INSTALLMAN1DIR=$(debtmp)/usr/man/man1 \
                        INSTALLMAN3DIR=$(debtmp)/usr/man/man3 \
                        OVERRIDE=true \
                        perl Makefile.PL && \
                touch perl-config


perl-build: build
        cp -a src/include $(debtmp)/usr/lib/postgresql/
        cp src/interfaces/libpq/*.h $(debtmp)/usr/lib/postgresql/include
        cd src/interfaces/perl5 && \
                $(MAKE) PREFIX=$(debtmp)/usr \
                        POSTGRES_HOME=$(debtmp)/usr/lib/postgresql \
                        INSTALLDIRS=perl \
                        INSTALLMAN1DIR=$(debtmp)/usr/man/man1 \
                        INSTALLMAN3DIR=$(debtmp)/usr/man/man3 \
                        LDDLFLAGS="-shared -L$(debtmp)/usr/lib" \
                        LDFLAGS=-L../libpq \
                        LDLOADLIBS="-L../libpq -lpq -lc"
        rm -rf $(debtmp)/usr/lib/postgresql/include


binary-arch:    build-test perl-build install-python
        # patch current arch into libpgperl's directory and file lists
        sed 's/%ARCH%/$(ARCH)/g' <debian/libpgperl.dirs.in >debian/libpgperl.dirs
        sed 's/%ARCH%/$(ARCH)/g' <debian/libpgperl.files.in >debian/libpgperl.files
        dh_installdirs -a
        # install files into the debian/<package> trees
   ...
        cd src/interfaces/perl5 && \
                $(MAKE) PREFIX=$(debtmp)/usr \
                        POSTGRES_HOME=$(debtmp)/usr/lib/postgresql \
                        INSTALLDIRS=perl \
                        INSTALLMAN1DIR=$(debtmp)/usr/man/man1 \
                        INSTALLMAN3DIR=$(debtmp)/usr/man/man3 \
                        LDDLFLAGS="-shared -L$(debtmp)/usr/lib" \
                        LDFLAGS=-L../libpq \
                        pure_install
   ...
        rm -f debian/libpgperl/usr/lib/perl5/i386-linux/5.004/auto/Pg/.packlist
        rm -rf $(debtmp)/usr/lib/perl5
        rm -rf debian/libpgperl/usr/lib/perl5/i386



If you want the full works, download the Debian source package for
PostgreSQL - 6.4.2 will do (Debian's current unstable version, shortly
to be replaced by 6.5)

  >(just imagine, redhat and debian cooperating, hell must be freezing
  >over ;)
 
Just comfortably warm, thanks!

-- 
      Vote against SPAM: http://www.politik-digital.de/spam/
                 ========================================
Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "The Spirit of the Lord is upon me, because he hath 
      anointed me to preach the gospel to the poor; he hath 
      sent me to heal the brokenhearted, to preach  
      deliverance to the captives, and recovering of sight 
      to the blind, to set at liberty them that are  
      bruised..."         Luke 4:18 


Responses

pgsql-hackers by date

Next:From: Jan WieckDate: 1999-06-28 17:02:06
Subject: Re: [HACKERS] Adding "eval" to pl?
Previous:From: Mark HollomonDate: 1999-06-28 15:50:27
Subject: Re: [HACKERS] Perl library (was Building Postgres)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group