# Copyright 2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 inherit base DESCRIPTION="Throttleable lightweight httpd server" SRC_URI="http://www.acme.com/software/thttpd/${P}.tar.gz" HOMEPAGE="http://www.acme.com/software/thttpd" PATCHES="${FILESDIR}/thttpd-time.h-patch-2.20c" KEYWORDS="~x86" SLOT="0" LICENSE="BSD" IUSE="" DEPEND="virtual/glibc" src_compile() { econf # WEBDIR is compiled into makeweb. We don't presently make it # setgid, though. Sysadmins wanting that feature should enable # it manually. All other options should be set in /etc/thttpd.conf. make WEBDIR=/var/www || die "make failed" } src_install () { into /usr dodoc README dodoc TODO dodoc ${FILESDIR}/README.gentoo-2.20c dosbin thttpd doman thttpd.8 dodir /usr/lib/thttpd/cgi-src insinto /usr/lib/thttpd/cgi-src insopts -m0755 doins cgi-src/redirect doman cgi-src/redirect.8 doins cgi-src/ssi doman cgi-src/ssi.8 doins cgi-src/phf doins cgi-bin/printenv dosbin extras/makeweb dosbin extras/htpasswd dosbin extras/syslogtocern doman extras/makeweb.1 doman extras/htpasswd.1 doman extras/syslogtocern.8 exeinto /etc/init.d; newexe ${FILESDIR}/thttpd-init-2.20c thttpd insinto /etc insopts -m0644 newins ${FILESDIR}/thttpd.conf-2.20c thttpd.conf dodir /var/www } pkg_postinst() { # usermod returns 2 on user-exists-but-no-flags-given usermod thttpd &>/dev/null if [ $? != 2 ]; then useradd -s /bin/false -d /var/www -c thttpd thttpd assert "problem adding user thttpd" fi }