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.

54 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../phppgadmin/phppgadmin.conf
  5. # Copyright (C) 2008 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. # use the php prefix
  16. pkgprefix -t php
  17. prefix=$( pkgprefix php )
  18. set_confopt
  19. makeopt=
  20. makeinstopt=
  21. hook_add postmake 5 'phppgadmin_install'
  22. hook_add postdoc 5 'phppgadmin_installconf'
  23. phppgadmin_install() {
  24. local x="phpPgAdmin"
  25. mkdir -vp $datadir/$x
  26. mkdir -vp $sysconfdir/$x
  27. # if $x/conf exists it's not overwritten, a new link is created
  28. # inside, i.e. $x/conf/$x -> .
  29. # ( /me hates these stupid behavior of ln )
  30. if [ ! -e $datadir/$x/conf ]; then
  31. ln -vfs $sysconfdir/$x $datadir/$x/conf
  32. fi
  33. # phpPgAdmin/conf/config.inc.php excluded, template can be
  34. # found at phpPgAdmin/conf/config.inc.php-dist
  35. rm -f conf/config.inc.php
  36. tar -c * | tar -x -v -C $datadir/$x
  37. }
  38. phppgadmin_installconf() {
  39. local x="phpPgAdmin"
  40. cat <<- EOT > $sysconfdir/$x.conf-dist
  41. Alias /$x $datadir/$x
  42. <Directory $datadir/$x>
  43. DirectoryIndex index.php
  44. </Directory>
  45. EOT
  46. }