POSTGRES.ECLASS

Section: eclass-manpages (5)
Updated: Apr 2024
Index Return to Main Contents

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

7 8

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.

ECLASS 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:
POSTGRES_COMPAT=( 9.2 9.3 9.4 9.5 9.6 10 )
POSTGRES_COMPAT=( 9.{2,3} 9.{4..6} 10 ) # Same as previous
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.
PG_SLOT
PG_SLOT is the chosen PostgreSQL slot that is used for the build.
PG_CONFIG
PG_CONFIG is the path to pg_config for the chosen PostgreSQL slot. For example, PG_CONFIG="pg_config15"

AUTHORS

Aaron W. Swenson <titanofold@gentoo.org>

MAINTAINERS

PostgreSQL <pgsql-bugs@gentoo.org>

REPORTING BUGS

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

FILES

postgres.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/postgres.eclass


Index

NAME
DESCRIPTION
SUPPORTED EAPIS
FUNCTIONS
ECLASS VARIABLES
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:00 GMT, April 23, 2024