postgres.eclass

Name

postgres.eclass -- An eclass for PostgreSQL-related packages

Description

This eclass provides common utility functions that many PostgreSQL-related packages perform, such as checking that the currently selected PostgreSQL slot is within a range, adding a system user to the postgres system group, and generating dependencies.

Supported EAPIs

5 6 7

Exported Phases

  • pkg_setup

Functions

postgres_check_slot

Verify that the currently selected PostgreSQL slot is set to one of the slots defined in POSTGRES_COMPAT. Automatically dies unless a POSTGRES_COMPAT slot is selected. Should be called in pkg_pretend().

postgres_pkg_setup

Initialize environment variable(s) according to the best installed version of PostgreSQL that is also in POSTGRES_COMPAT. This is required if pkg_setup() is declared in the ebuild. Exports PG_SLOT, PG_CONFIG, and PKG_CONFIG_PATH.

Variables

POSTGRES_COMPAT (SET BEFORE INHERIT)

A Bash array containing a list of compatible PostgreSQL slots as defined by the developer. If declared, must be declared before inheriting this eclass. Example: CODE OSTGRES_COMPAT=( 9.2 9.3 9.4 9.5 9.6 10 ) OSTGRES_COMPAT=( 9.{2,3} 9.{4..6} 10 ) # Same as previous CODE

POSTGRES_DEP = "dev-db/postgresql:="

An automatically generated dependency string suitable for use in DEPEND and RDEPEND declarations.

POSTGRES_USEDEP (SET BEFORE INHERIT)

Add the 2-Style and/or 4-Style use dependencies without brackets to be used for POSTGRES_DEP. If declared, must be declared before inheriting this eclass.

POSTGRES_REQ_USE

An automatically generated REQUIRED_USE-compatible string built upon POSTGRES_COMPAT. REQUIRED_USE="... ${POSTGRES_REQ_USE}" is only required if the package must build against one of the PostgreSQL slots declared in POSTGRES_COMPAT.

Authors

Aaron W. Swenson <titanofold@gentoo.org>

Maintainers

PostgreSQL <pgsql-bugs@gentoo.org>

Reporting Bugs

Please report bugs via https://bugs.gentoo.org/