All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/2] postgresql: add version output to pg_config
Date: Mon, 12 Mar 2018 06:12:30 -0400	[thread overview]
Message-ID: <20180312101231.2280-1-aduskett@gmail.com> (raw)

Some external packages call pg_config to determine the installed PostgreSQL
version. Add this output to Buildroots own pg_config, so these packages
correctly compile.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v3:
 - Added this patch to the series.

 package/postgresql/pg_config     | 5 ++++-
 package/postgresql/postgresql.mk | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config
index 85c0e63ddb..642252f27f 100644
--- a/package/postgresql/pg_config
+++ b/package/postgresql/pg_config
@@ -14,6 +14,9 @@ case "$1" in
   --libdir)
 	echo "$prefix/lib"
 	;;
+  --version)
+	echo "PostgreSQL @POSTGRESQL_VERSION@"
+	;;
   *)
-	echo "Usage: $0 {--includedir|--libdir}"
+	echo "Usage: $0 {--includedir|--libdir|--version}"
 esac
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index c6b689a146..94b3e60e59 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -84,6 +84,7 @@ 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
+	$(SED) "s|@POSTGRESQL_VERSION@|$(POSTGRESQL_VERSION)|g" $(STAGING_DIR)/usr/bin/pg_config
 endef
 
 POSTGRESQL_POST_INSTALL_STAGING_HOOKS += POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG
-- 
2.14.3

             reply	other threads:[~2018-03-12 10:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 10:12 Adam Duskett [this message]
2018-03-12 10:12 ` [Buildroot] [PATCH v3 2/2] python-psycopg2: new package Adam Duskett
2018-03-12 10:34   ` Yegor Yefremov
2018-03-12 11:26     ` Adam Duskett
2018-03-12 12:37       ` Yegor Yefremov
2018-03-12 13:11         ` Adam Duskett
2018-04-05  8:08   ` Thomas Petazzoni
2018-04-04 21:00 ` [Buildroot] [PATCH v3 1/2] postgresql: add version output to pg_config Thomas Petazzoni

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=20180312101231.2280-1-aduskett@gmail.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.