summaryrefslogtreecommitdiff
blob: 9a3f6c86793ad703428a6719529e4ceadf8033c5 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/yaws/yaws-1.58.ebuild,v 1.1 2006/04/14 06:10:54 mkennedy Exp $

inherit eutils

DESCRIPTION="Yaws is a high performance HTTP 1.1 web server."
HOMEPAGE="http://yaws.hyber.org/"
SRC_URI="http://yaws.hyber.org/download/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc ~amd64"
IUSE=""

DEPEND="dev-lang/erlang"

# see http://bugs.gentoo.org/show_bug.cgi?id=97707

src_unpack() {
	unpack ${A}
	# see http://sourceforge.net/mailarchive/message.php?msg_id=15302808
	epatch ${FILESDIR}/${PV}-true_nozip.patch
	find ${S} -depth -type d -name .xvpics -exec rm -rf '{}' \;
}

src_install() {
	make DESTDIR=${D} install || die
	# Use /var/log and not /var/lib/log for Yaws logging directory
	rm -rf ${D}/var/lib/log
	sed -i 's,/var/lib/log,/var/log,g' \
		's,#.*username = root.*,username = nobody,g' \
		${D}/etc/yaws.conf
	keepdir /var/log/yaws
	# We need to keep these directories so that the example yaws.conf works
	# properly
	keepdir /usr/lib/yaws/examples/ebin
	keepdir /usr/lib/yaws/examples/include
	dodoc ChangeLog LICENSE README
	newinitd ${FILESDIR}/yaws.init.d yaws
	newconfd ${FILESDIR}/yaws.conf.d yaws
}