| 1 |
blueness |
1.8 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
bangert |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
blueness |
1.9 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.25b-r7.ebuild,v 1.8 2012/07/11 23:36:11 blueness Exp $
|
| 4 |
bangert |
1.1 |
|
| 5 |
|
|
inherit eutils 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 |
blueness |
1.8 |
LICENSE="BSD GPL-2"
|
| 14 |
bangert |
1.1 |
SLOT="0"
|
| 15 |
fmccor |
1.5 |
KEYWORDS="amd64 ~hppa ~mips ppc sparc x86 ~x86-fbsd"
|
| 16 |
bangert |
1.1 |
IUSE="static"
|
| 17 |
|
|
|
| 18 |
|
|
THTTPD_USER=thttpd
|
| 19 |
|
|
THTTPD_GROUP=thttpd
|
| 20 |
|
|
|
| 21 |
|
|
src_unpack() {
|
| 22 |
|
|
unpack ${A}
|
| 23 |
bangert |
1.6 |
cd "${S}"
|
| 24 |
|
|
epatch "${FILESDIR}"/${MY_P}/*.diff
|
| 25 |
ssuominen |
1.7 |
epatch "${FILESDIR}"/${P}-glibc-2.10.patch
|
| 26 |
bangert |
1.1 |
}
|
| 27 |
|
|
|
| 28 |
|
|
pkg_setup() {
|
| 29 |
|
|
enewgroup ${THTTPD_GROUP}
|
| 30 |
|
|
enewuser ${THTTPD_USER} -1 -1 -1 ${THTTPD_GROUP}
|
| 31 |
|
|
}
|
| 32 |
|
|
|
| 33 |
|
|
src_compile() {
|
| 34 |
|
|
## TODO: what to do with IPv6?
|
| 35 |
|
|
use static && append-ldflags -static
|
| 36 |
|
|
|
| 37 |
|
|
econf || die "econf failed"
|
| 38 |
|
|
emake || die "emake failed"
|
| 39 |
|
|
}
|
| 40 |
|
|
|
| 41 |
|
|
src_install () {
|
| 42 |
|
|
dodir /usr/share/man/man1
|
| 43 |
bangert |
1.6 |
make prefix="${D}"/usr \
|
| 44 |
|
|
MANDIR="${D}"/usr/share/man \
|
| 45 |
bangert |
1.1 |
WEBGROUP=${THTTPD_GROUP} \
|
| 46 |
bangert |
1.6 |
WEBDIR="${D}"/var/www/localhost \
|
| 47 |
bangert |
1.1 |
"$@" install || die "make install failed"
|
| 48 |
|
|
|
| 49 |
bangert |
1.6 |
mv "${D}"/usr/sbin/{,th_}htpasswd
|
| 50 |
|
|
mv "${D}"/usr/share/man/man1/{,th_}htpasswd.1
|
| 51 |
bangert |
1.1 |
|
| 52 |
bangert |
1.6 |
newinitd "${FILESDIR}"/${MY_P}/thttpd.init thttpd
|
| 53 |
|
|
newconfd "${FILESDIR}"/${MY_P}/thttpd.confd thttpd
|
| 54 |
bangert |
1.1 |
|
| 55 |
|
|
dodoc README INSTALL TODO
|
| 56 |
|
|
|
| 57 |
|
|
insinto /etc/logrotate.d
|
| 58 |
|
|
newins "${FILESDIR}/thttpd.logrotate" thttpd
|
| 59 |
|
|
|
| 60 |
|
|
insinto /etc/thttpd
|
| 61 |
bangert |
1.6 |
doins "${FILESDIR}"/${MY_P}/thttpd.conf.sample
|
| 62 |
bangert |
1.1 |
}
|
| 63 |
|
|
|
| 64 |
|
|
pkg_postinst() {
|
| 65 |
|
|
elog "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !"
|
| 66 |
|
|
}
|