Postgis/postgresql as openembedded/yocto recipe

August Larsson August.Larsson at axis.com
Tue Jan 28 02:30:57 PST 2025


Hello!

I am trying to build postgis in yocto environment. Does anyone have any experience in this?

SUMMARY = "PostGIS is a spatial database extender for PostgreSQL \
object-relational database. It adds support for geographic \
objects allowing location queries to be run in SQL."
HOMEPAGE = "https://postgis.net/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=50e16bf358714da17c7f759954384398"

PR = "r0"

SRC_URI = "\
https://download.osgeo.org/postgis/source/${BPN}-${PV}.tar.gz<https://download.osgeo.org/postgis/source/$%7BBPN%7D-$%7BPV%7D.tar.gz> \
"

SRC_URI[md5sum] = "cbde5b95e73e248f71cdd485db011671"
SRC_URI[sha256sum] = "fb9f95d56e3aaef6a296473c76a3b99005ac41864d486c197cd478c9b14f791a"

DEPENDS += "proj json-c libxml2 geos gdal postgresql"
inherit autotools-brokensep pkgconfig gettext

# We rely on postgresql to have a crossscript alternative to the binary pg_config
EXTRA_OECONF = "\
--with-pgconfig=${STAGING_BINDIR_CROSS}/pg_config \
--with-gdallibdir=${STAGING_LIBDIR} \
"

CFLAGS += "-DPOSTGIS_DEBUG_LEVEL=0"

FILES_${PN} += "${libdir}/postgresql/lib/"
FILES_${PN} += "${datadir}"
FILES_${PN} += "${datadir}/postgresql/contrib/postgis-3.5"
FILES_${PN} += "${datadir}/postgresql/extension"
This is my recipe at the moment, but I have some difficulty with the pg_config file. It does not end up in STAGING_BINDIR_CROSS. I suspect I need some bbappend for my postgresql recipe for this to work.

Any help would be greatly appreciated!

/August



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250128/2ca0c992/attachment.htm>


More information about the postgis-users mailing list