diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-11-04 14:04:18 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-11-11 17:00:55 +0200 |
commit | b948362b92cbe4f9c2d18522291fd43c022498ce (patch) | |
tree | 420dfa72eda75772bd46617638068fad376c38d8 /psql | |
parent | 87270c8d670492ff7afe00dedd4ebae7936caab9 (diff) |
Add support for relocatable installation.
Diffstat (limited to 'psql')
-rw-r--r-- | psql/manifest | 4 | ||||
-rw-r--r-- | psql/psql/buildfile | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/psql/manifest b/psql/manifest index a7f2867..105a74e 100644 --- a/psql/manifest +++ b/psql/manifest @@ -3,7 +3,7 @@ name: psql # Note: remember to update doc-url below! # -version: 14.1.0+5 +version: 14.1.0+6 upstream-version: 14.1 project: postgresql @@ -18,7 +18,7 @@ package-url: https://git.build2.org/cgit/packaging/postgresql/ email: pgsql-general@lists.postgresql.org ; Mailing list. package-email: packaging@build2.org ; Mailing list. build-error-email: builds@build2.org -builds: all +builds: all relocatable builds: -wasm depends: * build2 >= 0.15.0 depends: * bpkg >= 0.15.0 diff --git a/psql/psql/buildfile b/psql/psql/buildfile index 30fa4cf..9462f28 100644 --- a/psql/psql/buildfile +++ b/psql/psql/buildfile @@ -89,7 +89,7 @@ switch $tclass, $tsys # As it is noted in libpq's buildfile, the whole idea feels utterly broken and # so, similar to libpq, we just do bare minimum and wait and see. # -if ($install.root != [null]) +if ($install.root != [null] && !$install.relocatable) { root = $install.resolve($install.root) sysconfdir = ($windows || $root != /usr ? $root/etc : /etc) @@ -112,8 +112,10 @@ if ($install.root != [null]) } else { - sysconfdir = ($windows ? $out_base : /usr/local/pgsql/etc) - pgbindir = $out_base + d = (!$install.relocatable ? $out_base : '') + + sysconfdir = ($windows ? $d : /usr/local/pgsql/etc) + pgbindir = $d pgsharedir = ($windows ? '' : /usr/local/share) includedir = ($windows ? '' : /usr/local/include) |