summaryrefslogtreecommitdiff
blob: afb72318d55dd2ccea61c3133bef9fb355a6c46d (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
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-0.4.5.ebuild,v 1.2 2004/08/21 18:02:25 foser Exp $

S="${WORKDIR}/${P}"
DESCRIPTION="An extremely fast and tiny web server."
SRC_URI="ftp://alobbs.com/cherokee/${PV}/${P}.tar.gz
	ftp://laurel.datsi.fi.upm.es/pub/linux/cherokee/${PV}/${P}.tar.gz"
HOMEPAGE="http://www.alobbs.com/cherokee"
LICENSE="GPL-2"

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

RDEPEND="virtual/libc
	>=sys-libs/zlib-1.1.4-r1
	gnome? ( >=dev-libs/glib-2.2.2
		>=gnome-base/orbit-2.6.1
		>=gnome-base/gnome-vfs-2.2.4 )"

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

src_unpack ()
{
	unpack "${A}"

	# patch to fix Makefile DESTDIR compliance

	einfo "Applying Makefile.am patch"
	patch ${S}/Makefile.am < ${FILESDIR}/${P}-Makefile.am.patch

	einfo "Running automake to update Makefile.in"
	cd ${S}
	automake
}

src_compile ()
{
	use gnome && my_conf="$my_conf --enable-gnomevfs"

# coming soon ;-)
#	use php && my_conf="$my_conf --with-php"
#	use mono && my_conf="$my_conf --with-mono"

	./configure --prefix=/usr --sysconfdir=/etc --disable-static $my_conf --with-pic
	emake || die
}

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

	dodoc AUTHORS ChangeLog COPYING INSTALL README

	# install the Gentoo-ised config file

	cp ${FILESDIR}/${P}-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}/${P}-init.d ${D}/etc/init.d/cherokee
}