1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/postgresql/postgresql.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 if [ $prefix_auto = 1 ]; then
14 if [ "$SDECFG_PKG_POSTGRESQL_CORE_PREFIX" ]; then
15 prefix="$SDECFG_PKG_POSTGRESQL_CORE_PREFIX"
17 prefix="opt/postgresql"
22 var_append extraconfopt " " "--with-CXX"
23 var_append extraconfopt " " "--with-gnu-ld"
24 var_append extraconfopt " " "--with-perl"
25 var_append extraconfopt " " "--with-openssl"
27 # --with-tcl build Tcl modules (PL/Tcl)
28 if pkginstalled perl; then
29 var_append extraconfopt " " "--with-perl"
31 if pkginstalled python; then
32 var_append extraconfopt " " "--with-python"
36 # Create the data directory
37 mkdir -p $root$localstatedir/lib/postgres/
38 chown -R postgres:postgres $root$localstatedir/lib/postgres
41 echo "Creating /etc/profile.d/$pkg ..."
42 cat <<- EOT > $root/etc/profile.d/$pkg
43 export PGDATA=$localstatedir/lib/postgres
47 hook_add postmake 5 "postgresql_pm"
49 hook_add postmake 4 "make -C contrib/"
50 hook_add postdoc 3 "cp -dR contrib/ $docdir/"