pgxs.bbclass: add class for PostgreSQL extensions

Extensions that build with PGXS need the same dependency, make
arguments and FILES. Put them in a class so a recipe only has to
inherit pgxs.

Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Babanpreet Singh authored and Khem Raj committed 2026-11-11 18:20:13 -08:00
1 parent 8521c1f634
commit b114ccb74a
1 file changed
+22
+22
View File
@@ -0,0 +1,22 @@
#
# Copyright OpenEmbedded Contributors
#
# SPDX-License-Identifier: MIT
#
# Class for PostgreSQL extensions that are built with PGXS
DEPENDS += "postgresql"
# USE_PGXS is for makefiles that can also build inside the PostgreSQL tree
EXTRA_OEMAKE:append = " USE_PGXS=1 PG_CONFIG=pg_config"
pgxs_do_install() {
oe_runmake install DESTDIR=${D}
}
EXPORT_FUNCTIONS do_install
FILES:${PN} += "${libdir}/postgresql ${datadir}/postgresql"
RDEPENDS:${PN} += "postgresql"