| 1 |
# Copyright 1999-2005 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.25b-r1.ebuild,v 1.1 2005/03/08 14:42:54 ka0ttic Exp $
|
| 4 |
|
| 5 |
inherit flag-o-matic
|
| 6 |
|
| 7 |
MY_P="${P%[a-z]*}"
|
| 8 |
|
| 9 |
DESCRIPTION="Small and fast multiplexing webserver."
|
| 10 |
HOMEPAGE="http://www.acme.com/software/thttpd/"
|
| 11 |
SRC_URI="http://www.acme.com/software/thttpd/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="BSD"
|
| 14 |
SLOT="0"
|
| 15 |
KEYWORDS="~x86 ~ppc"
|
| 16 |
IUSE="static"
|
| 17 |
|
| 18 |
DEPEND="virtual/libc"
|
| 19 |
|
| 20 |
src_compile() {
|
| 21 |
## TODO: what to do with IPv6?
|
| 22 |
|
| 23 |
append-ldflags -Wl,-z,now
|
| 24 |
use static && append-ldflags -static
|
| 25 |
|
| 26 |
econf || die "econf failed"
|
| 27 |
emake || die "emake failed"
|
| 28 |
}
|
| 29 |
|
| 30 |
src_install () {
|
| 31 |
dodir /usr/share/man/man1
|
| 32 |
make prefix=${D}/usr \
|
| 33 |
MANDIR=${D}/usr/share/man \
|
| 34 |
WEBGROUP=nogroup \
|
| 35 |
WEBDIR=${D}/var/www/localhost \
|
| 36 |
"$@" install || die "make install failed"
|
| 37 |
|
| 38 |
mv ${D}/usr/sbin/{,th_}htpasswd
|
| 39 |
mv ${D}/usr/share/man/man1/{,th_}htpasswd.1
|
| 40 |
|
| 41 |
newinitd ${FILESDIR}/${MY_P}/thttpd.init thttpd
|
| 42 |
newconfd ${FILESDIR}/${MY_P}/thttpd.confd thttpd
|
| 43 |
|
| 44 |
dodoc README INSTALL TODO
|
| 45 |
|
| 46 |
insinto /etc/thttpd
|
| 47 |
doins ${FILESDIR}/${MY_P}/thttpd.conf.sample
|
| 48 |
}
|
| 49 |
|
| 50 |
pkg_postinst() {
|
| 51 |
einfo "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !"
|
| 52 |
}
|