summaryrefslogtreecommitdiffstats
path: root/package/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'package/postgresql')
-rw-r--r--package/postgresql/pg_config19
-rw-r--r--package/postgresql/postgresql.mk8
2 files changed, 27 insertions, 0 deletions
diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config
new file mode 100644
index 0000000000..85c0e63ddb
--- /dev/null
+++ b/package/postgresql/pg_config
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#
+# Minimal pg_config implementation as replacement for the native pg_config application
+# Only implements --includedir and --libdir
+#
+
+prefix=/usr
+
+case "$1" in
+ --includedir)
+ echo "$prefix/include"
+ ;;
+ --libdir)
+ echo "$prefix/lib"
+ ;;
+ *)
+ echo "Usage: $0 {--includedir|--libdir}"
+esac
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 6941e55dfd..dd2e678954 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -11,6 +11,7 @@ POSTGRESQL_LICENSE = PostgreSQL
POSTGRESQL_LICENSE_FILES = COPYRIGHT
POSTGRESQL_INSTALL_STAGING = YES
+POSTGRESQL_CONFIG_SCRIPTS = pg_config
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
POSTGRESQL_CONF_OPT += --disable-thread-safety
@@ -55,6 +56,13 @@ endef
POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
+define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
+ $(INSTALL) -m 0755 -D package/postgresql/pg_config \
+ $(STAGING_DIR)/usr/bin/pg_config
+endef
+
+POSTGRESQL_POST_INSTALL_STAGING_HOOKS += POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
+
define POSTGRESQL_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/postgresql/S50postgresql \
$(TARGET_DIR)/etc/init.d/S50postgresql
OpenPOWER on IntegriCloud