mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Björn Esser" <b.esser@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: "Björn Esser" <b.esser@pengutronix.de>
Subject: [ptxdist] [PATCH v2 2/2] TimescaleDB: new package.
Date: Tue,  8 Oct 2019 16:39:07 +0200	[thread overview]
Message-ID: <20191008143906.6989-1-b.esser@pengutronix.de> (raw)
In-Reply-To: <20191008143452.31308-2-b.esser@pengutronix.de>

TimescaleDB is an open-source database designed to make SQL scalable
for time-series data.  It is engineered up from PostgreSQL, providing
automatic partitioning across time and space (partitioning key), as
well as full SQL support.

This package builds the Apache licensed PostgreSQL extension, only.

Signed-off-by: Björn Esser <b.esser@pengutronix.de>
---

ChangeLog:

  * v1 --> v2: Add missing patches.

 ...CMake-Allow-PG_DIRS-to-be-set-on-CLI.patch | 83 +++++++++++++++++++
 patches/timescaledb-1.4.2/series              |  4 +
 rules/timescaledb.in                          | 15 ++++
 rules/timescaledb.make                        | 68 +++++++++++++++
 4 files changed, 170 insertions(+)
 create mode 100644 patches/timescaledb-1.4.2/0001-CMake-Allow-PG_DIRS-to-be-set-on-CLI.patch
 create mode 100644 patches/timescaledb-1.4.2/series
 create mode 100644 rules/timescaledb.in
 create mode 100644 rules/timescaledb.make

diff --git a/patches/timescaledb-1.4.2/0001-CMake-Allow-PG_DIRS-to-be-set-on-CLI.patch b/patches/timescaledb-1.4.2/0001-CMake-Allow-PG_DIRS-to-be-set-on-CLI.patch
new file mode 100644
index 000000000..1d0783ad7
--- /dev/null
+++ b/patches/timescaledb-1.4.2/0001-CMake-Allow-PG_DIRS-to-be-set-on-CLI.patch
@@ -0,0 +1,83 @@
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <b.esser@pengutronix.de>
+Date: Tue, 8 Oct 2019 16:07:18 +0200
+Subject: [PATCH] CMake: Allow PG_DIRS to be set on CLI.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Björn Esser <b.esser@pengutronix.de>
+---
+ CMakeLists.txt | 60 +++++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 36 insertions(+), 24 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1cf987e25087..440ca400d27a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -173,30 +173,42 @@ if ((${PG_VERSION} VERSION_LESS "9.6")
+ endif ()
+ 
+ # Get PostgreSQL configuration from pg_config
+-execute_process(
+-  COMMAND ${PG_CONFIG} --includedir
+-  OUTPUT_VARIABLE PG_INCLUDEDIR
+-  OUTPUT_STRIP_TRAILING_WHITESPACE)
+-execute_process(
+-  COMMAND ${PG_CONFIG} --includedir-server
+-  OUTPUT_VARIABLE PG_INCLUDEDIR_SERVER
+-  OUTPUT_STRIP_TRAILING_WHITESPACE)
+-execute_process(
+-  COMMAND ${PG_CONFIG} --libdir
+-  OUTPUT_VARIABLE PG_LIBDIR
+-  OUTPUT_STRIP_TRAILING_WHITESPACE)
+-execute_process(
+-  COMMAND ${PG_CONFIG} --pkglibdir
+-  OUTPUT_VARIABLE PG_PKGLIBDIR
+-  OUTPUT_STRIP_TRAILING_WHITESPACE)
+-execute_process(
+-  COMMAND ${PG_CONFIG} --sharedir
+-  OUTPUT_VARIABLE PG_SHAREDIR
+-  OUTPUT_STRIP_TRAILING_WHITESPACE)
+-execute_process(
+-  COMMAND ${PG_CONFIG} --bindir
+-  OUTPUT_VARIABLE PG_BINDIR
+-  OUTPUT_STRIP_TRAILING_WHITESPACE)
++if (NOT PG_INCLUDEDIR)
++  execute_process(
++    COMMAND ${PG_CONFIG} --includedir
++    OUTPUT_VARIABLE PG_INCLUDEDIR
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++endif ()
++if (NOT PG_INCLUDEDIR_SERVER)
++  execute_process(
++    COMMAND ${PG_CONFIG} --includedir-server
++    OUTPUT_VARIABLE PG_INCLUDEDIR_SERVER
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++endif ()
++if (NOT PG_LIBDIR)
++  execute_process(
++    COMMAND ${PG_CONFIG} --libdir
++    OUTPUT_VARIABLE PG_LIBDIR
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++endif ()
++if (NOT PG_PKGLIBDIR)
++  execute_process(
++    COMMAND ${PG_CONFIG} --pkglibdir
++    OUTPUT_VARIABLE PG_PKGLIBDIR
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++endif ()
++if (NOT PG_SHAREDIR)
++  execute_process(
++    COMMAND ${PG_CONFIG} --sharedir
++    OUTPUT_VARIABLE PG_SHAREDIR
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++endif ()
++if (NOT PG_BINDIR)
++  execute_process(
++    COMMAND ${PG_CONFIG} --bindir
++    OUTPUT_VARIABLE PG_BINDIR
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++endif ()
+ execute_process(
+   COMMAND ${PG_CONFIG} --cppflags
+   OUTPUT_VARIABLE PG_CPPFLAGS
diff --git a/patches/timescaledb-1.4.2/series b/patches/timescaledb-1.4.2/series
new file mode 100644
index 000000000..21fdfcd49
--- /dev/null
+++ b/patches/timescaledb-1.4.2/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-CMake-Allow-PG_DIRS-to-be-set-on-CLI.patch
+# de329d03824139106c1f232b0f546edc  - git-ptx-patches magic
diff --git a/rules/timescaledb.in b/rules/timescaledb.in
new file mode 100644
index 000000000..1419e02bb
--- /dev/null
+++ b/rules/timescaledb.in
@@ -0,0 +1,15 @@
+## SECTION=system_libraries
+
+config TIMESCALEDB
+	tristate
+	select HOST_CMAKE
+	select HOST_POSTGRESQL
+	select POSTGRESQL
+	prompt "timescaledb"
+	help
+	  TimescaleDB is an open-source database designed to make SQL scalable
+	  for time-series data.  It is engineered up from PostgreSQL, providing
+	  automatic partitioning across time and space (partitioning key), as
+	  well as full SQL support.
+
+	  This package builds the Apache licensed PostgreSQL extension, only.
diff --git a/rules/timescaledb.make b/rules/timescaledb.make
new file mode 100644
index 000000000..14a994b98
--- /dev/null
+++ b/rules/timescaledb.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Bjoern Esser <bes@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TIMESCALEDB) += timescaledb
+
+#
+# Paths and names
+#
+TIMESCALEDB_VERSION	:= 1.4.2
+TIMESCALEDB_MD5		:= d3c1282031bc2c5a314eb217f4a49796
+TIMESCALEDB		:= timescaledb-$(TIMESCALEDB_VERSION)
+TIMESCALEDB_SUFFIX	:= tar.gz
+TIMESCALEDB_URL		:= https://github.com/timescale/timescaledb/archive/$(TIMESCALEDB_VERSION).$(TIMESCALEDB_SUFFIX)
+TIMESCALEDB_SOURCE	:= $(SRCDIR)/$(TIMESCALEDB).$(TIMESCALEDB_SUFFIX)
+TIMESCALEDB_DIR		:= $(BUILDDIR)/$(TIMESCALEDB)
+TIMESCALEDB_LICENSE	:= Apache-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+TIMESCALEDB_CONF_TOOL	:= cmake
+TIMESCALEDB_CONF_OPT	:= \
+	$(CROSS_CMAKE_USR) \
+	-DCMAKE_PROGRAM_PATH="$(PTXDIST_SYSROOT_HOST)" \
+	-DPG_BINDIR="/usr/bin" \
+	-DPG_INCLUDEDIR="$(PTXDIST_SYSROOT_TARGET)/usr/include" \
+	-DPG_INCLUDEDIR_SERVER="$(PTXDIST_SYSROOT_TARGET)/usr/include/postgresql/server" \
+	-DPG_LIBDIR="$(PTXDIST_SYSROOT_TARGET)/usr/lib" \
+	-DPG_PKGLIBDIR="/usr/lib/postgresql" \
+	-DPG_SHAREDIR="/usr/share/postgresql" \
+	-DUSE_OPENSSL=0 \
+	-DAPACHE_ONLY=1
+
+# -DAPACHE_ONLY=1   is needed to build a free/libre version of TimescaleDB.
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/timescaledb.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, timescaledb)
+	@$(call install_fixup, timescaledb,PRIORITY,optional)
+	@$(call install_fixup, timescaledb,SECTION,base)
+	@$(call install_fixup, timescaledb,AUTHOR,"Bjoern Esser <bes@pengutronix.de>")
+	@$(call install_fixup, timescaledb,DESCRIPTION,missing)
+
+	@$(call install_tree, timescaledb, 0, 0, -, /usr/lib/postgresql)
+	@$(call install_tree, timescaledb, 0, 0, -, /usr/share/postgresql)
+
+	@$(call install_finish, timescaledb)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.23.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-10-08 14:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 14:34 [ptxdist] [PATCH 1/2] host-postgresql: " Björn Esser
2019-10-08 14:34 ` [ptxdist] [PATCH 2/2] TimescaleDB: " Björn Esser
2019-10-08 14:39   ` Björn Esser [this message]
2019-10-08 15:40 ` [ptxdist] [PATCH 1/2] host-postgresql: " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191008143906.6989-1-b.esser@pengutronix.de \
    --to=b.esser@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox