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 - 2011 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. # use a dedicated sysconfdir
  17. sysconfdir="$sysconfdir/$pkg"
  18. # change the default localstatedir
  19. localstatedir="$localstatedir/lib/$pkg"
  20. if [ "$SDECFG_PKG_POSTGRESQL_CLIENTONLY" == 1 ]; then
  21. makeinstopt=
  22. hook_add postmake 5 "postgresqlclient_pm"
  23. else
  24. hook_add postmake 5 "postgresql_pm"
  25. fi
  26. # check if we should build and install the contributed 3rd. party
  27. # applications and tools
  28. if [ "$SDECFG_PKG_POSTGRESQL_CONTRIB" == 1 ]; then
  29. var_append patchfiles ' ' "$confdir/build_contrib.diff"
  30. var_append makeopt ' ' "world"
  31. var_append makeinstopt ' ' "install-world"
  32. fi
  33. var_append extraconfopt " " "--with-gnu-ld"
  34. # Enable thread-safety for libpq and ecpg by default
  35. var_append confopt ' ' "--enable-thread-safety"
  36. # --with-tcl build Tcl modules (PL/Tcl)
  37. for x in openssl perl python; do
  38. if pkginstalled $x; then
  39. var_append extraconfopt " " "--with-$x"
  40. fi
  41. done
  42. for x in readline; do
  43. if ! pkginstalled $x; then
  44. var_append extraconfopt " " "--without-$x"
  45. fi
  46. done
  47. # Do not build internal TZData if external is installed
  48. if pkginstalled tzdata ; then
  49. pkgprefix -t tzdata
  50. var_append extraconfopt " " "--with-system-tzdata=$( pkgprefix datadir tzdata )/zoneinfo"
  51. fi
  52. postgresqlclient_pm() {
  53. var_remove makeopt ' ' "world"
  54. for x in src/{bin,include,interfaces}; 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. }