# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ ## ugly globbing (sometimes the name-restrictions for ebuilds suck): PATCH_LEVEL="${P##*_}" MY_P=${P/-adf/} MY_P=${MY_P%_*} MY_P="${MY_P}b" DESCRIPTION="Small and fast multiplexing webserver (with A.D.F. patches)." HOMEPAGE="http://www.acme.com/software/thttpd/ http://xoomer.virgilio.it/adefacc/httpd/thttpd/thttpd-2.21b-pNN/index.html" SRC_URI="http://www.acme.com/software/thttpd/${MY_P}.tar.gz http://xoomer.virgilio.it/adefacc/httpd/thttpd/thttpd-2.21b-pNN/${MY_P}-${PATCH_LEVEL}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="x86" IUSE="" DEPEND="virtual/glibc" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} cd ${S} epatch ${WORKDIR}/${MY_P}-${PATCH_LEVEL}.patch } src_compile() { econf || die emake || die } src_install () { mkdir -p ${D}/usr/share/man/man1 make prefix=${D}/usr \ MANDIR=${D}/usr/share/man \ WEBGROUP=nogroup \ WEBDIR=${D}/var/www \ "$@" install || die "installation failed :(" ## rename to allow the thttpd-variants to be installed in parallel: mv ${D}/usr/sbin/thttpd{,-adf} || die "rename failed" mv ${D}/usr/share/man/man8/thttpd{,-adf}.8 || die "rename failed" ## htpasswd is identical for all thttpd-variants: mv ${D}/usr/sbin/{,th_}htpasswd mv ${D}/usr/share/man/man1/{,th_}htpasswd.1 exeinto /etc/init.d newexe ${FILESDIR}/thttpd-adf.init thttpd-adf insinto /etc/conf.d newins ${FILESDIR}/thttpd-adf.confd thttpd-adf dodoc README dodoc TODO insinto /etc/thttpd/ doins ${FILESDIR}/thttpd-adf.conf.sample } pkg_postinst() { einfo "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd-adf !" einfo "See http://xoomer.virgilio.it/adefacc/httpd/thttpd/thttpd-2.21b-pNN/thttpd-2.21b-pNN-log.txt" einfo "for details of the patched version." }