OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../postgresql/postgresql.conf
  5. # Copyright (C) 2006 - 2010 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if [ $prefix_auto = 1 ] ; then
  17. if [ "$SDECFG_PKG_POSTGRESQL_PREFIX" ] ; then
  18. prefix="$SDECFG_PKG_POSTGRESQL_PREFIX"
  19. else
  20. prefix="opt/postgresql"
  21. fi
  22. set_confopt
  23. fi
  24. if [ "$SDECFG_PKG_POSTGRESQL_CLIENTONLY" == 1 ]; then
  25. makeinstopt=
  26. hook_add postmake 5 "postgresqlclient_pm"
  27. else
  28. hook_add postmake 5 "postgresql_pm"
  29. fi
  30. # check if we should build and install the contributed 3rd. party
  31. # applications and tools
  32. [ "$SDECFG_PKG_POSTGRESQL_CONTRIB" == 0 ] ||
  33. var_append patchfiles ' ' "$confdir/build_contrib.diff"
  34. var_append extraconfopt " " "--with-gnu-ld"
  35. # Enable thread-safety for libpq and ecpg by default
  36. var_append confopt ' ' "--enable-thread-safety"
  37. # --with-tcl build Tcl modules (PL/Tcl)
  38. for x in openssl perl python; do
  39. if pkginstalled $x; then
  40. var_append extraconfopt " " "--with-$x"
  41. fi
  42. done
  43. for x in readline; do
  44. if ! pkginstalled $x; then
  45. var_append extraconfopt " " "--without-$x"
  46. fi
  47. done
  48. # Do not build internal TZData if external is installed
  49. if pkginstalled tzdata ; then
  50. pkgprefix -t tzdata
  51. var_append extraconfopt " " "--with-system-tzdata=$( pkgprefix datadir tzdata )/zoneinfo"
  52. fi
  53. postgresqlclient_pm() {
  54. for x in src/{bin,include,interfaces} doc; do
  55. eval $MAKE $makeopt -C $x install
  56. done
  57. }
  58. postgresql_pm() {
  59. # Create the data directory
  60. mkdir -p $root/$localstatedir/data
  61. chown -R postgres:postgres $root/$localstatedir/data
  62. # Create the Profile
  63. echo "Creating /etc/profile.d/$pkg ..."
  64. cat <<- EOT > $root/etc/profile.d/$pkg
  65. export PGDATA=$localstatedir/data
  66. EOT
  67. }