# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="apache2" DESCRIPTION="PHP scripts intended to manage MythTV from a web browser." SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2" HOMEPAGE="http://www.mythtv.org/" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" RDEPEND="dev-db/mysql dev-php/mod_php" DEPEND="${RDEPEND}" src_install() { HTTPD_USER="apache" HTTPD_GROUP="apache" if [ ! -z "`use apache2`" -a -e "/etc/apache2/conf/apache2.conf" ] ; then HTTPD_ROOT="`grep '^DocumentRoot' /etc/apache2/conf/apache2.conf | cut -d' ' -f2`" elif [ -e "/etc/apache/conf/apache.conf" ] ; then HTTPD_ROOT="`grep '^DocumentRoot' /etc/apache/conf/apache.conf | cut -d' ' -f2`" else HTTPD_ROOT="/home/httpd/htdocs" ewarn ewarn "No apache config file found in /etc, assuming DocumentRoot /home/httpd/htdocs" ewarn fi dodoc README dodir "${HTTPD_ROOT}" cp -R "${S}" "${D}/${HTTPD_ROOT}/${PN}" } pkg_postinst() { einfo "You should modify ${HTTPD_ROOT}/${PN}/settings.php" einfo "to fit your needs." }