# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../phpmyadmin/phpmyadmin.conf
# Copyright (C) 2007 The OpenSDE Project
#
# 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 the php prefix
pkgprefix -t php
prefix=$( pkgprefix php )
set_confopt

# custom installer
makeopt=
makeinstopt=

hook_add postmake 5 'phpmyadmin_install'

phpmyadmin_install() {
	local x="phpMyAdmin"

	mkdir -vp $root$datadir/$x

	tar -cf - * | tar -C $root$datadir/$x -xvf -

	cat <<- EOT > $root$sysconfdir/$x.conf-dist
		Alias /$x $datadir/$x
		<Directory $datadir/$x>
			DirectoryIndex index.php
		</Directory>
	EOT
}