# ChangeLog for www-servers/thttpd
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/ChangeLog,v 1.14 2006/07/05 18:15:34 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/ChangeLog,v 1.15 2006/09/06 14:31:17 dsd Exp $
+
+*thttpd-2.25b-r5 (06 Sep 2006)
+
+ 06 Sep 2006; Daniel Drake <dsd@gentoo.org> files/thttpd-2.25/thttpd.init,
+ -thttpd-2.25b-r4.ebuild, +thttpd-2.25b-r5.ebuild:
+ Fix init script to change into configured directory before starting,
+ reported by Laurence Withers in bug #142047
05 Jul 2006; Stefan Schweizer <genstef@gentoo.org>
-files/php5.0-stdint.diff,
--- /dev/null
+MD5 a0e9cd87455d3a0ea11e5ea7e947adf6 thttpd-2.25b.tar.gz 132363
+RMD160 15020e8d04d27b30c4da3104387a281e35d58025 thttpd-2.25b.tar.gz 132363
+SHA256 4ceaa30ef55702d5cfdffdccd3a2dee8d3090e852c18c7ce8d17d692ad0bf024 thttpd-2.25b.tar.gz 132363
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/files/thttpd-2.25/thttpd.init,v 1.1 2004/08/08 18:34:03 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/files/thttpd-2.25/thttpd.init,v 1.2 2006/09/06 14:31:17 dsd Exp $
depend() {
need net
eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/thttpd"
exit 1
fi
- cd $THTTPD_DOCROOT
- if [ $? -ne 0 ]; then
- eend $? "ERROR: cannot change to docroot \"$THTTPD_DOCROOT\""
- fi
start-stop-daemon --quiet --start --startas /usr/sbin/thttpd \
- --pidfile /var/run/thttpd.pid -- ${THTTPD_OPTS}
+ --pidfile /var/run/thttpd.pid --chdir "$THTTPD_DOCROOT" -- \
+ ${THTTPD_OPTS}
eend $?
}
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.25b-r5.ebuild,v 1.1 2006/09/06 14:31:17 dsd Exp $
+
+inherit eutils flag-o-matic
+
+MY_P="${P%[a-z]*}"
+
+DESCRIPTION="Small and fast multiplexing webserver."
+HOMEPAGE="http://www.acme.com/software/thttpd/"
+SRC_URI="http://www.acme.com/software/thttpd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ppc x86"
+IUSE="static"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${MY_P}/fix-insecure-tmp-creation-CVE-2005-3124.diff
+}
+
+src_compile() {
+ ## TODO: what to do with IPv6?
+
+ append-ldflags $(bindnow-flags)
+ use static && append-ldflags -static
+
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install () {
+ dodir /usr/share/man/man1
+ make prefix=${D}/usr \
+ MANDIR=${D}/usr/share/man \
+ WEBGROUP=nogroup \
+ WEBDIR=${D}/var/www/localhost \
+ "$@" install || die "make install failed"
+
+ mv ${D}/usr/sbin/{,th_}htpasswd
+ mv ${D}/usr/share/man/man1/{,th_}htpasswd.1
+
+ newinitd ${FILESDIR}/${MY_P}/thttpd.init thttpd
+ newconfd ${FILESDIR}/${MY_P}/thttpd.confd thttpd
+
+ dodoc README INSTALL TODO
+
+ insinto /etc/thttpd
+ doins ${FILESDIR}/${MY_P}/thttpd.conf.sample
+}
+
+pkg_postinst() {
+ einfo "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !"
+}