summaryrefslogtreecommitdiff
blob: 4e45292392bb508bb8f56f2d2d5941c0201d44f2 (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
# Copyright 2008-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-cpp/cppserv/cppserv-0.1.103.ebuild,v 1.2 2008/03/01 20:33:21 iluxa Exp $

inherit eutils apache-module

DESCRIPTION="CPPSERV is an application server providing Servlet-like API in C++ and a C++ Server Pages parser."
HOMEPAGE="http://www.total-knowledge.com/progs/cppserv"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~x86 ~mips ~amd64"
IUSE="debug"

APACHE2_MOD_CONF="75_mod_cserv"
APACHE2_MOD_DEFINE="CPPSERV"

DEPEND="net-libs/socket++
	>=dev-cpp/sptk-3.5.6
	>=www-servers/apache-2
	dev-libs/boost
"

need_apache2

src_compile() {
	local CPPSERV_DBG_FLAG
	use debug && CPPSERV_DBG_FLAG="CPPFLAGS=-DMODCSERV_DEBUG"
	emake PREFIX=/usr ADON_VERBOSE=1 ADON_BUILD=release ${CPPSERV_DBG_FLAG} || die "emake failed"
}

src_install() {
	local CPPSERV_DBG_FLAG
	use debug && CPPSERV_DBG_FLAG="CPPFLAGS=-DMODCSERV_DEBUG"
	emake PREFIX=/usr ADON_BUILD=release DESTDIR="${D}" ${CPPSERV_DBG_FLAG} install || die "emake install failed"
	insinto "${APACHE_MODULES_CONFDIR}"
	doins "${FILESDIR}/${APACHE2_MOD_CONF}.conf" || die "internal ebuild error: \"${FILESDIR}/${APACHE2_MOD_CONF}.conf\" not found"
}