# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../postgresql/postgresql.conf # Copyright (C) 2006 - 2011 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # # More information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- # use a dedicated sysconfdir sysconfdir="$sysconfdir/$pkg" # change the default localstatedir localstatedir="$localstatedir/lib/$pkg" if [ "$SDECFG_PKG_POSTGRESQL_CLIENTONLY" == 1 ]; then makeinstopt= hook_add postmake 5 "postgresqlclient_pm" else hook_add postmake 5 "postgresql_pm" fi # check if we should build and install the contributed 3rd. party # applications and tools [ "$SDECFG_PKG_POSTGRESQL_CONTRIB" == 0 ] || var_append patchfiles ' ' "$confdir/build_contrib.diff" var_append extraconfopt " " "--with-gnu-ld" # Enable thread-safety for libpq and ecpg by default var_append confopt ' ' "--enable-thread-safety" # --with-tcl build Tcl modules (PL/Tcl) for x in openssl perl python; do if pkginstalled $x; then var_append extraconfopt " " "--with-$x" fi done for x in readline; do if ! pkginstalled $x; then var_append extraconfopt " " "--without-$x" fi done # Do not build internal TZData if external is installed if pkginstalled tzdata ; then pkgprefix -t tzdata var_append extraconfopt " " "--with-system-tzdata=$( pkgprefix datadir tzdata )/zoneinfo" fi postgresqlclient_pm() { for x in src/{bin,include,interfaces} doc; do eval $MAKE $makeopt -C $x install done } postgresql_pm() { # Create the data directory mkdir -p $root/$localstatedir/data chown -R postgres:postgres $root/$localstatedir/data # Create the Profile echo "Creating /etc/profile.d/$pkg ..." cat <<- EOT > $root/etc/profile.d/$pkg export PGDATA=$localstatedir/data EOT }