# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="apache2" RESTRICT="nostrip" # no sense in stripping php files DESCRIPTION="A set of php files intended to manage MythTV listings from a web browser." SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2" HOMEPAGE="http://www.mythtv.org/" KEYWORDS="x86" SLOT="0" LICENSE="GPL-2" DEPEND="dev-db/mysql dev-php/mod_php" src_install() { if [ `use apache2` ] && [ -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 dodir "${HTTPD_ROOT}" cp -R "${S}" "${D}/${HTTPD_ROOT}/${PN}" } pkg_postinst() { einfo einfo "For configuration and customization please have a look at" einfo " ${HTTPD_ROOT}/settings.php" einfo einfo "Once satisfied with the settings pull it up by visiting" einfo " http:///${PN}" einfo }