# Copyright 2003 Anthony de Boer (will assign to Gentoo project) # Distributed under the terms of the GNU General Public License v2 DESCRIPTION="Throttleable lightweight httpd server" HOMEPAGE="http://www.acme.com/software/thttpd" LICENSE="BSD" DEPEND="virtual/glibc" KEYWORDS="~x86" SLOT="0" IUSE="" SRC_URI="http://www.acme.com/software/thttpd/${P}.tar.gz" # ------------------------------------------------- src_unpack() { unpack ${A} patch -d ${S} < ${FILESDIR}/thttpd-time.h-patch-2.20c } 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 } src_install () { 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 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 }