summaryrefslogtreecommitdiff
blob: 4d4d25b243218fe7669b20055716f4186b14e111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/mythweb/mythweb-0.10.ebuild,v 1.1 2003/07/09 00:10:36 johnm Exp $ 

IUSE="apache2"
DESCRIPTION="PHP scripts intended to manage MythTV from a web browser."
HOMEPAGE="http://www.mythtv.org/"
SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
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."
	echo

}