summaryrefslogtreecommitdiff
blob: b90d8e1d3d281573beb17893542e5ba705e6b581 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit apache-module

DESCRIPTION="A QOS module for the apache webserver"
HOMEPAGE="http://mod-qos.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND="dev-libs/apr
	dev-libs/openssl"
RDEPEND="${DEPEND}"

APACHE2_MOD_CONF=10_${PN}
APACHE2_MOD_DEFINE="QOS"
APXS2_S=${S}/apache2
APACHE2_MOD_FILE=${APXS2_S}/.libs/${PN}.so
APACHE2_EXECFILES="${APXS2_S}"/.libs/mod_qos_control.so
DOCFILES=${S}/doc/*.html

need_apache2

src_compile() {
	local MYOPTS="-c mod_qos.c"
	cd "${APXS2_S}"
	${APXS} ${MYOPTS} || die "compile failed"
	MYOPTS="-c mod_qos.lo"
	${APXS} ${MYOPTS} || die "compile failed"
	MYOPTS="-c mod_qos_control.c"
	${APXS} ${MYOPTS} || die "compile failed"
	MYOPTS="-c mod_qos_control.lo"
	${APXS} ${MYOPTS} || die "compile failed"
	cd "${S}"/tools
	sed -i -e '/strip/ d' Makefile || die "sed tools makefile failed"
	emake || die "emake failed"
}
src_install() {
	apache-module_src_install
	dobin tools/qslog || die "Install qslog failed"
}