1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/phppgadmin/phppgadmin.conf
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
14 prefix=$(pkgprefix php)
20 hook_add postmake 5 'phppgadmin_install'
21 hook_add postdoc 5 'phppgadmin_installconf'
23 phppgadmin_install() {
27 mkdir -vp $sysconfdir/$x
29 # if $x/conf exists it's not overwritten, a new link is created
30 # inside, i.e. $x/conf/$x -> .
31 if [ ! -e $datadir/$x/conf ]; then
32 ln -vfs $sysconfdir/$x $datadir/$x/conf
35 # phpPgAdmin/conf/config.inc.php excluded, template can be
36 # found at phpPgAdmin/conf/config.inc.php-dist
37 rm -f conf/config.inc.php
38 tar -c * | tar -x -v -C $datadir/$x
40 phppgadmin_installconf() {
43 cat <<- EOT > $sysconfdir/$x.conf-dist
45 <Directory $datadir/$x>
46 DirectoryIndex index.php