# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-www/mod_throttle/mod_throttle-3.1.2-r1.ebuild,v 1.11 2004/06/25 01:04:36 agriffis Exp $ DESCRIPTION="XML questionnaires for Apache" HOMEPAGE="http://gathering.itm.mh.se/modsurvey/" KEYWORDS="~x86" IUSE="apache2" MY_P=${P/mod_survey/modsurvey} S=${WORKDIR}/${MY_P} SRC_URI="http://gathering.itm.mh.se/modsurvey/download/test/${MY_P}.tar.gz" DEPEND="apache2? ( >=net-www/apache-2 ) !apache2? ( =net-www/apache-1* )" LICENSE="GPL-2" SLOT="0" src_unpack() { unpack ${A} cd ${S} sed -i "s|\/usr\/local\/mod_survey\/|${D}\/usr\/local\/mod_survey\/|g" installer.pl } src_compile() { :; } src_install() { dodir /usr/local/mod_survey if use apache2; then perl installer.pl < /dev/null > /dev/null 2>&1 dosed /usr/local/mod_survey/survey.conf insinto /etc/apache2/conf/modules.d newins ${D}/usr/local/mod_survey/survey.conf 99_mod_survey.conf else echo -e "\n\n\n\n\n\n\nyes\n\n" > out perl installer.pl < out > /dev/null 2>&1 rm -f out dosed /usr/local/mod_survey/survey.conf insinto /etc/apache/conf/addon-modules/ newins ${D}/usr/local/mod_survey/survey.conf 99_mod_survey.conf fi } pkg_postinst() { if ! use apache2; then einfo "Now execute:" einfo "echo \"Include conf/addon-modules/99_mod_survey.conf\" >> /etc/apache/conf/apache.conf" einfo fi einfo "Restart Apache and test your installation: http://YOURHOST/mod_survey" }