1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
Author: Martin Pitt <mpitt@debian.org>
Description: Use version specific installation directories so that several major versions can be installed in parallel.
Forwarded: No, Debian specific packaging with postgresql-common
* Install lib files into /usr/lib/postgresql/<version>/lib/
* Install server related header files into /usr/include/postgresql/<version>/server/
* Disable PostgreSQL's automagic path mangling and fix libdir for pg_config,
so that pg_config in /usr/bin and /usr/lib/postgresql/<version>/bin behave
identically.
Bug-Debian: http://bugs.debian.org/462037
Index: postgresql-9.1-9.1.0/src/Makefile.global.in
===================================================================
--- postgresql-9.1-9.1.0.orig/src/Makefile.global.in 2011-09-09 07:21:46.011745835 +0200
+++ postgresql-9.1-9.1.0/src/Makefile.global.in 2011-09-09 07:21:51.041745870 +0200
@@ -96,7 +96,7 @@
pkglibdir = $(libdir)
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
-override pkglibdir := $(pkglibdir)/postgresql
+override pkglibdir := $(pkglibdir)/postgresql/9.1/lib
endif
endif
@@ -144,7 +144,7 @@
# These derived path variables aren't separately configurable.
-includedir_server = $(pkgincludedir)/server
+includedir_server = $(pkgincludedir)/9.1/server
includedir_internal = $(pkgincludedir)/internal
pgxsdir = $(pkglibdir)/pgxs
Index: postgresql-9.1-9.1.0/src/bin/pg_config/pg_config.c
===================================================================
--- postgresql-9.1-9.1.0.orig/src/bin/pg_config/pg_config.c 2011-09-09 07:21:46.031745835 +0200
+++ postgresql-9.1-9.1.0/src/bin/pg_config/pg_config.c 2011-09-09 07:21:51.041745870 +0200
@@ -26,6 +26,8 @@
#include "port.h"
+#include "../port/pg_config_paths.h"
+
static const char *progname;
static char mypath[MAXPGPATH];
@@ -481,7 +483,6 @@
{
int i;
int j;
- int ret;
set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_config"));
@@ -497,13 +498,7 @@
}
}
- ret = find_my_exec(argv[0], mypath);
-
- if (ret)
- {
- fprintf(stderr, _("%s: could not find own program executable\n"), progname);
- exit(1);
- }
+ snprintf(mypath, sizeof(mypath), "%s/%s", PGBINDIR, progname);
/* no arguments -> print everything */
if (argc < 2)
|