summaryrefslogtreecommitdiff
blob: 187dc9adfb8cfaa85b43ab107068df2f093306b4 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/mod_watch/mod_watch-4.03.ebuild,v 1.4 2004/09/14 12:53:59 stuart Exp $

DESCRIPTION="Bandwidth graphing for Apache with MRTG"
HOMEPAGE="http://www.snert.com/Software/mod_watch/"
KEYWORDS="~x86 ~ppc"

MY_V="`echo ${PV} | sed -e 's:\.::g'`"
S=${WORKDIR}/${P}
SRC_URI="http://www.snert.com/Software/download/${PN}${MY_V}.tgz"

DEPEND="=net-www/apache-2*
	>=sys-apps/sed-4"
LICENSE="as-is"
SLOT="0"
S="${WORKDIR}/${PN}-4.3"

src_compile() {
	sed -i \
		-e "s:APXS=/home/apache2/bin/apxs:APXS=/usr/sbin/apxs2:" \
		-e "s:APACHECTL=apachectl:APACHECTL=/usr/sbin/apache2ctl:" \
		Makefile.dso || die "Path fixing failed."
	make -f Makefile.dso build || die "Make failed."
}

src_install() {
	exeinto /usr/lib/apache2-extramodules
	doexe .libs/mod_watch.so

	exeinto /usr/sbin
	doexe apache2mrtg.pl
	doexe mod_watch.pl

	dodir /var/lib/mod_watch
	dohtml index.shtml

	insinto /etc/apache2/conf/addon-modules
	doins ${FILESDIR}/mod_watch.conf
}