pg_buildext.pod 2.62 KB
Newer Older
1 2 3 4 5 6
=head1 NAME

pg_buildext - Build and install a PostgreSQL extension

=head1 SYNOPSIS

7
B<pg_buildext> I<action> I<target> I<opts>
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

=head1 DESCRIPTION

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

=head1 OPTIONS

=over 4

=item B<action>

One of B<configure>, B<build>, B<install>, or B<clean>.

=item B<target>

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

=item B<opts>

C<%v> signs in B<opts> will get replaced as in B<target>.

=over 4

=item B<configure>

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

=item B<build>

Custom C<CFLAGS> options to use for the build.

=item B<install>

50
Package name to install for. Make will be called with DESTDIR="$(CURDIR)/debian/I<package>".
51 52 53 54 55 56 57 58 59

=item B<clean>

B<clean> does not take extra options.

=back

=back

60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
=head1 SUPPORTED VERSIONS

B<pg_buildext> reads C<debian/pgversions> to decide which PostgreSQL to build
modules/extensions for. This file contains one PostgreSQL version number per
line, in the following formats:

=over 4

=item B<all>

Support all versions. This is recommended unless there are known incompatibilities.

=item I<X.Y>

Support this version.

=item I<X.Y>B<+>

Support this and all greater versions.

=item B<#>I<...>

Comment.

=back

For a version to be used, it must also be listed in the output of
C</usr/share/postgresql-common/supported-versions>. See this file for how to
configure the list of supported versions on your system.

90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
=head1 USAGE

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

=head1 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


=head1 AUTHOR

Dimitri Fontaine L<E<lt>dim@tapoueh.orgE<gt>>, with extensions by
Christoph Berg L<E<lt>myon@debian.orgE<gt>>.