# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils gnuconfig DESCRIPTION="Small and embeddable HTTPD server with CGI support" HOMEPAGE="http://shttpd.sf.net" SRC_URI="http://easynews.dl.sourceforge.net/sourceforge/shttpd/${PN}_${PV}.c" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~s390 ~sparc x86" IUSE="ssl" DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g )" PROVIDE="www-servers/shttpd" src_unpack() { # notning to do, the author unpacked it already :-) cp ${DISTDIR}/${PN}_${PV}.c ${WORKDIR} } src_compile() { cd ${WORKDIR} if use ssl ; then gcc -DWITH_SSL -lcrypto -lssl -o shttpd "${PN}_${PV}.c" || die else gcc -o shttpd "${PN}_${PV}.c" || die fi } src_install() { exeinto /usr/bin doexe ${WORKDIR}/shttpd insinto /etc/xinetd.d newins "${FILESDIR}"/shttpd.xinetd shttpd insinto /etc/conf.d ; newins ${FILESDIR}/shttpd.confd shttpd exeinto /etc/init.d ; newexe ${FILESDIR}/shttpd.rc6 shttpd } pkg_postinst() { einfo "You can run shttpd standalone or in xinetd mode." einfo "Please read http://shttpd.sourceforge.net/ for more info!" }