summaryrefslogtreecommitdiff
blob: 6e88c272a3ec91c0272d5f350af7474c8511df4b (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
50
51
52
53
54
55
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-0.4.21.ebuild,v 1.2 2005/05/16 19:09:32 bass Exp $

inherit eutils

DESCRIPTION="An extremely fast and tiny web server."
SRC_URI="http://www.0x50.org/download/${PV%.*}/${PV}/${P}.tar.gz"
HOMEPAGE="http://www.0x50.org/"
LICENSE="GPL-2"

RDEPEND="virtual/libc
	>=sys-libs/zlib-1.1.4-r1"

DEPEND=">=sys-devel/automake-1.7.5
	${RDEPEND}"

KEYWORDS="~x86 ~ppc ~sparc"
SLOT="0"
IUSE=""

src_unpack() {
	unpack ${A}
	cd ${S}

	# bug 86038 - cherokee will fail to build with >=gnutls-1.2.0 (API change)
	if has_version '>=net-libs/gnutls-1.2.0' ; then
		sed -i 's/\(gnutls_certificate_set_rsa\)\(_params\)/\1_export\2/' \
			cherokee/virtual_server.c || die "sed failed"
	fi
}

src_compile() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--disable-static \
		--with-pic || die "configure failed"
	emake || die "emake failed"
}

src_install () {
	make DESTDIR=${D} install || die "make install failed"
	dodoc AUTHORS ChangeLog COPYING INSTALL README

	insinto /etc/cherokee
	newins ${FILESDIR}/${PN}-0.4.17-cherokee.conf cherokee.conf || \
		die "newins failed"

	# add default doc-root and cgi-bin locations
	dodir /var/www/localhost/htdocs
	dodir /var/www/localhost/cgi-bin

	newinitd ${FILESDIR}/${PN}-0.4.17-init.d ${PN} || die "newinitd failed"
}