new file mode 100644
@@ -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"
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> --- meta-oe/classes/pgxs.bbclass | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta-oe/classes/pgxs.bbclass