summaryrefslogtreecommitdiff
blob: bb1b6f9220ec1029b88aeaa21043999e14c2b1ff (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
49
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/syweb/syweb-0.58-r1.ebuild,v 1.1 2008/12/13 17:43:49 tcunha Exp $

inherit depend.php eutils webapp

DESCRIPTION="Web frontend to symon"
HOMEPAGE="http://www.xs4all.nl/~wpd/symon/"
SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz"

LICENSE="BSD-2"
WEBAPP_MANUAL_SLOT="yes"
SLOT="0"
KEYWORDS="~amd64 ~sparc ~x86"
IUSE=""

DEPEND=""
RDEPEND="net-analyzer/rrdtool"

need_httpd_cgi
need_php_httpd

S=${WORKDIR}/${PN}

src_unpack() {
	unpack ${A}

	epatch "${FILESDIR}"/${PN}-class_lexer.inc.patch	\
	       "${FILESDIR}"/${PN}-setup.inc.patch			\
	       "${FILESDIR}"/${PN}-total_firewall.layout.patch
}

src_install() {
	webapp_src_preinst

	dodoc "${WORKDIR}"/syweb/{CHANGELOG,README} || die "dodoc failed"
	docinto layouts
	dodoc "${WORKDIR}"/syweb/symon/total* || die "dodoc layouts failed"

	dodir "${MY_HOSTROOTDIR}"/${PN}/cache
	keepdir "${MY_HTDOCSDIR}"/layouts
	webapp_serverowned "${MY_HOSTROOTDIR}"/${PN}/cache
	insinto "${MY_HTDOCSDIR}"
	doins -r "${WORKDIR}"/syweb/htdocs/syweb/* || die "doins failed"
	webapp_configfile "${MY_HTDOCSDIR}"/setup.inc
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt

	webapp_src_install
}