diff --git a/meta-oe/recipes-dbs/postgresql/files/pg-config b/meta-oe/recipes-dbs/postgresql/files/pg-config new file mode 100644 index 00000000000..9ba8471d996 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/pg-config @@ -0,0 +1,55 @@ +#!/bin/sh + +# +# Minimal pg_config implementation as replacement for the native pg_config application +# + +prefix=@SYSROOT@/usr + +case "$1" in + --includedir) + echo "$prefix/include" + ;; + --pkgincludedir) + echo "$prefix/include/postgresql" + ;; + --includedir-server) + echo "$prefix/include/postgresql/server" + ;; + --libdir) + echo "$prefix/lib" + ;; + --version) + echo "PostgreSQL @POSTGRESQL_VERSION@" + ;; + --configure) + echo "@POSTGRESQL_CONF_OPTIONS@" + ;; + --pgxs) + echo "$prefix/lib/postgresql/pgxs/src/makefiles/pgxs.mk" + ;; + --cflags) + echo "@TARGET_CFLAGS@" + ;; + --cc) + echo "@TARGET_CC@" + ;; + --pkglibdir) + echo "/usr/lib/postgresql" + ;; + --bindir) + echo "/usr/bin" + ;; + --sharedir) + echo "/usr/share/postgresql" + ;; + --localedir) + echo "/usr/share/locale" + ;; + --docdir) + echo "/usr/share/doc/postgresql" + ;; + --mandir) + echo "/usr/share/man" + ;; +esac diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index e609ac33e59..b480e2f1c57 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -24,6 +24,7 @@ DEPENDS = "libnsl2 zlib readline tzcode-native" ARM_INSTRUCTION_SET = "arm" SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \ + file://pg-config \ file://postgresql.init \ file://postgresql-profile \ file://postgresql.pam \ @@ -212,6 +213,15 @@ do_install:append() { ${D}${systemd_unitdir}/system/postgresql.service } +sysroot_stage_all:append() { + install -d ${SYSROOT_DESTDIR}${bindir}/crossscripts + install -m 0755 ${WORKDIR}/pg-config ${SYSROOT_DESTDIR}${bindir}/crossscripts/pg_config + sed -i -e "s|@SYSROOT@|${SYSROOT_DESTDIR}|g" -e "s|@POSTGRESQL_VERSION@|${PV}|g" \ + -e "s|@POSTGRESQL_CONF_OPTIONS@|${PACKAGECONFIG_CONFARGS}|g" \ + -e "s|@TARGET_CFLAGS@|${CFLAGS}|g" -e "s|@TARGET_CC@|${CC}|g" \ + ${SYSROOT_DESTDIR}${bindir}/crossscripts/pg_config +} + SSTATE_SCAN_FILES += "Makefile.global" SSTATE_SCAN_FILES:remove = "*_config" diff --git a/meta-oe/recipes-dbs/timescaledb-tune/timescaledb-tune.inc b/meta-oe/recipes-dbs/timescaledb-tune/timescaledb-tune.inc new file mode 100644 index 00000000000..6e03b3276f7 --- /dev/null +++ b/meta-oe/recipes-dbs/timescaledb-tune/timescaledb-tune.inc @@ -0,0 +1,18 @@ +DESCRIPTION = "A utility for tuning TimescaleDB" + +RDEPENDS:${PN}="timescaledb" + +GO_IMPORT = "github.com/timescale/timescaledb-tune" +export GO111MODULE="off" + +inherit go + +SRC_URI = "\ + git://${GO_IMPORT};protocol=https;rev=${TUNE_COMMIT};destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \ + git://github.com/fatih/color;protocol=https;rev=${COLOR_COMMIT};destsuffix=${BPN}-${PV}/src/github.com/fatih/color \ + git://github.com/pbnjay/memory;protocol=https;rev=${MEMORY_COMMIT};destsuffix=${BPN}-${PV}/src/github.com/pbnjay/memory \ +" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +FILES_${PN} += "${GOBIN_FINAL}/*" diff --git a/meta-oe/recipes-dbs/timescaledb-tune/timescaledb-tune_0.12.0.bb b/meta-oe/recipes-dbs/timescaledb-tune/timescaledb-tune_0.12.0.bb new file mode 100644 index 00000000000..b99139b4072 --- /dev/null +++ b/meta-oe/recipes-dbs/timescaledb-tune/timescaledb-tune_0.12.0.bb @@ -0,0 +1,5 @@ +include timescaledb-tune.inc + +TUNE_COMMIT="f46f6580532c6c567f130ec8d008bf8f582c3cb5" +COLOR_COMMIT="daf2830f2741ebb735b21709a520c5f37d642d85" +MEMORY_COMMIT="974d429e7ae40c89e7dcd41cfcc22a0bfbe42510" diff --git a/meta-oe/recipes-dbs/timescaledb/timescaledb.inc b/meta-oe/recipes-dbs/timescaledb/timescaledb.inc new file mode 100644 index 00000000000..2ff6b2d1819 --- /dev/null +++ b/meta-oe/recipes-dbs/timescaledb/timescaledb.inc @@ -0,0 +1,21 @@ +DESCRIPTION = "TimescaleDB is a relational database for time-series data built as an extension for PostgreSQL." +HOMEPAGE = "https://timescale.com" +LICENSE = "APACHE-2.0 & TIMESCALE" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=a6919544b6c76fc2e0debe84e8dfc7a5 \ + file://${S}/LICENSE-APACHE;md5=2ee41112a44fe7014dce33e26468ba93 \ + file://${S}/tsl/LICENSE-TIMESCALE;md5=1b3b062af96cae618d6ebd31df2712c8 \ +" + +DEPENDS = "postgresql" +RDEPENDS:${PN} = "postgresql" + +SRC_URI = "git://github.com/timescale/timescaledb.git;protocol=https;branch=${BRANCH};rev=${COMMIT};destsuffix=timescaledb-${PV}" + +inherit cmake + +EXTRA_OECMAKE += " -DREGRESS_CHECKS=OFF" + +FILES_${PN} = "\ + ${datadir}/postgresql/extension/timescaledb* \ + ${libdir}/postgresql/timescaledb* \ +" diff --git a/meta-oe/recipes-dbs/timescaledb/timescaledb_2.5.1.bb b/meta-oe/recipes-dbs/timescaledb/timescaledb_2.5.1.bb new file mode 100644 index 00000000000..6cc81f3d686 --- /dev/null +++ b/meta-oe/recipes-dbs/timescaledb/timescaledb_2.5.1.bb @@ -0,0 +1,4 @@ +require timescaledb.inc + +BRANCH="2.5.x" +COMMIT="a2530ab5f251ba9680d2c270496d1e2e6fcf6367"