postgresql: add replacement pg_config
Normally pg_config is a native application compiled for the target architecture. Since we cannot execute those on the host system, provide a simple shell script as replacement. Signed-off-by: Floris Bos <bos@je-eigen-domein.nl> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
ac7e0a5d0d
commit
a9dbaa7726
|
@ -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
|
|
@ -11,6 +11,7 @@ POSTGRESQL_LICENSE = PostgreSQL
|
||||||
POSTGRESQL_LICENSE_FILES = COPYRIGHT
|
POSTGRESQL_LICENSE_FILES = COPYRIGHT
|
||||||
|
|
||||||
POSTGRESQL_INSTALL_STAGING = YES
|
POSTGRESQL_INSTALL_STAGING = YES
|
||||||
|
POSTGRESQL_CONFIG_SCRIPTS = pg_config
|
||||||
|
|
||||||
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||||
POSTGRESQL_CONF_OPT += --disable-thread-safety
|
POSTGRESQL_CONF_OPT += --disable-thread-safety
|
||||||
|
@ -55,6 +56,13 @@ endef
|
||||||
|
|
||||||
POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP
|
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
|
define POSTGRESQL_INSTALL_INIT_SYSV
|
||||||
$(INSTALL) -m 0755 -D package/postgresql/S50postgresql \
|
$(INSTALL) -m 0755 -D package/postgresql/S50postgresql \
|
||||||
$(TARGET_DIR)/etc/init.d/S50postgresql
|
$(TARGET_DIR)/etc/init.d/S50postgresql
|
||||||
|
|
Loading…
Reference in New Issue