summaryrefslogtreecommitdiff
blob: 0e8e8ff06aa7fe2212ac141af56d41d3491b6c15 (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
56
57
58
59
60
61
# 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.17.1.ebuild,v 1.3 2005/04/17 13:12:30 ka0ttic Exp $

MY_PV=0.4.17

DESCRIPTION="An extremely fast and tiny web server."
SRC_URI="ftp://alobbs.com/cherokee/0.4/${MY_PV}/${P}.tar.gz"
HOMEPAGE="http://www.alobbs.com/cherokee"
LICENSE="GPL-2"

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

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

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

S="${WORKDIR}/${PN}-${MY_PV}"

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/' \
			src/virtual_server.c || die "sed failed"
	fi
}

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

src_install () {
	make DESTDIR=${D} install || die

	dodoc AUTHORS ChangeLog COPYING INSTALL README

	# install the Gentoo-ised config file

	cp ${FILESDIR}/${PN}-${MY_PV}-cherokee.conf ${D}/etc/cherokee/cherokee.conf

	# remove the installed sample config file
#	rm ${D}/etc/cherokee/cherokee.conf.sample

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

	# add init.d script
	dodir /etc/init.d
	cp ${FILESDIR}/${PN}-${MY_PV}-init.d ${D}/etc/init.d/cherokee
}