mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v3 1/2] host-postgresql: new package.
@ 2019-10-09  8:51 Björn Esser
  2019-10-09  8:51 ` [ptxdist] [PATCH v3 2/2] TimescaleDB: " Björn Esser
  0 siblings, 1 reply; 2+ messages in thread
From: Björn Esser @ 2019-10-09  8:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Björn Esser

This package is required to build TimescaleDB.

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

ChangeLog:

  * v1 --> v2: Add missing patches.
  * v2 --> v3: Change stuff as pointed out by mol (m.olbrich).

 rules/host-postgresql.in   |  7 ++++
 rules/host-postgresql.make | 76 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)
 create mode 100644 rules/host-postgresql.in
 create mode 100644 rules/host-postgresql.make

diff --git a/rules/host-postgresql.in b/rules/host-postgresql.in
new file mode 100644
index 000000000..ac778582a
--- /dev/null
+++ b/rules/host-postgresql.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_POSTGRESQL
+	tristate
+	prompt "postgresql"
+	help
+	  FIXME
diff --git a/rules/host-postgresql.make b/rules/host-postgresql.make
new file mode 100644
index 000000000..d7f66b844
--- /dev/null
+++ b/rules/host-postgresql.make
@@ -0,0 +1,76 @@
+# -*-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
+#
+HOST_PACKAGES-$(PTXCONF_HOST_POSTGRESQL) += host-postgresql
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#HOST_POSTGRESQL_CONF_ENV	:= $(HOST_ENV)
+
+#
+# autoconf
+#
+HOST_POSTGRESQL_CONF_TOOL	:= autoconf
+HOST_POSTGRESQL_CONF_OPT	:= \
+	$(HOST_AUTOCONF) \
+	--enable-integer-datetimes \
+	--disable-nls \
+	--disable-rpath \
+	--enable-spinlocks \
+	--enable-atomics \
+	--enable-strong-random \
+	--disable-debug \
+	--disable-profiling \
+	--disable-coverage \
+	--disable-dtrace \
+	--disable-tap-tests \
+	--disable-depend \
+	--disable-cassert \
+	--enable-thread-safety \
+	--enable-largefile \
+	--disable-float4-byval \
+	--disable-float8-byval \
+	--without-llvm \
+	--without-icu \
+	--without-tcl \
+	--without-perl \
+	--without-python \
+	--without-gssapi \
+	--without-pam \
+	--without-bsd-auth \
+	--without-ldap \
+	--without-bonjour \
+	--without-openssl \
+	--without-selinux \
+	--without-systemd \
+	--without-readline \
+	--without-libedit-preferred \
+	--without-ossp-uuid \
+	--without-libxml \
+	--without-libxslt \
+	--with-system-tzdata=/usr/share/zoneinfo \
+	--without-zlib
+
+#  --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
+#  --enable-depend         turn on automatic dependency tracking
+#  --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
+#  --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+HOST_POSTGRESQL_MAKE_ENV	:= \
+	MAKELEVEL=0
+
+# vim: syntax=make
-- 
2.23.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ptxdist] [PATCH v3 2/2] TimescaleDB: new package.
  2019-10-09  8:51 [ptxdist] [PATCH v3 1/2] host-postgresql: new package Björn Esser
@ 2019-10-09  8:51 ` Björn Esser
  0 siblings, 0 replies; 2+ messages in thread
From: Björn Esser @ 2019-10-09  8:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Björn Esser

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>
---
 ...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                        | 69 +++++++++++++++
 4 files changed, 171 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..caab02123
--- /dev/null
+++ b/rules/timescaledb.make
@@ -0,0 +1,69 @@
+# -*-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 \
+	-DSEND_TELEMETRY_DEFAULT=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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-09  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09  8:51 [ptxdist] [PATCH v3 1/2] host-postgresql: new package Björn Esser
2019-10-09  8:51 ` [ptxdist] [PATCH v3 2/2] TimescaleDB: " Björn Esser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox