Skip to content

Latest commit

 

History

History
87 lines (52 loc) · 2.16 KB

pg_buildext.pod

File metadata and controls

87 lines (52 loc) · 2.16 KB

NAME

pg_buildext - Build and install a PostgreSQL extension

SYNOPSIS

pg_buildext action srcdir target opts

DESCRIPTION

pg_buildext is a script that will build a PostgreSQL extension in a VPATH way. It supports the configure, build, install, and clean actions, and will choose to build for the intersection of versions known in debian/pgversions (versions supported by the package) and in /usr/share/postgresql-common/supported-versions (versions supported in this release).

OPTIONS

action

One of configure, build, install, or clean.

srcdir

Where to find the extension sources, including the debian subdirectory. (Usually $(CURDIR).) If not specified, defaults to the current directory.

target

The target directory where to build the sources, it will get created for you if it does not exist. If the target contains a %v sign, it will get replaced by the specific version of PostgreSQL being built against. (Usually build-%v.)

opts

%v signs in opts will get replaced as in target.

configure

Options to pass to the configure script. (Most PostgreSQL extensions do not have a configure script.)

build

Custom CFLAGS options to use for the build.

install

Package name to install for. Make will be called with DESTDIR="srcdir/debian/package".

clean

clean does not take extra options.

USAGE

As pg_buildext invokes make for the build, install, and clean actions, invocations from debian/rules (which is a makefile) should be prefixed with + so the sub-makes can talk with the make jobserver.

EXAMPLE

build-stamp:
          +pg_buildext configure $(CURDIR) build-%v "--libdir=/usr/lib/postgresql/%v/lib --datadir=/usr/share/postgresql-%v-plsh"
          +pg_buildext build $(CURDIR) build-%v

install: build
          +pg_buildext install $(CURDIR) build-%v postgresql-%v-plsh

clean:
          +pg_buildext clean $(CURDIR) build-%v

AUTHOR

Dimitri Fontaine <[email protected]>, with extensions by Christoph Berg <[email protected]>.