# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-www/twiki/twiki-20030201.ebuild,v 1.8 2004/06/25 15:50:31 agriffis Exp $ inherit webapp DESCRIPTION="A Web Based Collaboration Platform" HOMEPAGE="http://twiki.org/" SRC_URI="http://twiki.org/swd/TWiki${PV}.tar.gz" IUSE="apache2" LICENSE="LGPL-2.1" KEYWORDS="~x86 ~ppc" S=${WORKDIR} DEPEND="net-www/webapp-config" RDEPEND=">=dev-lang/perl-5.6.1 >=app-text/rcs-5.7 virtual/cron apache2? ( >=net-www/apache-2 ) : ( =net-www/apache-1* )" src_compile() { :; } src_install() { webapp_src_preinst # per the install manual # we are not running an nobody, so need to change it to apache cd ${S}/data find . -name *.v~ -exec perl -pi~ -e '$. <= 10 && s/nobody:/apache:/ ' {} ; # so webapp-config doesn't complain touch ${S}/pub/{Main,Trash,Sandbox}/empty cd ${S} cp -r ${S}/* ${D}/${MY_HTDOCSDIR} if use apache2; then ewarn "Apache 2 is not recommended: use at your own risk" dodir /etc/apache2/conf/modules.d insinto /etc/apache2/conf/modules.d newins ${FILESDIR}/twiki.conf 97_twiki.conf else dodir /etc/apache/conf/addon-modules insinto /etc/apache/conf/addon-modules doins ${FILESDIR}/twiki.conf fi dodoc readme.txt license.txt chmod 0755 ${D}/${MY_HTDOCSDIR}/bin/* for file in `find data -type d -printf "%p/* "`; do webapp_serverowned "${MY_HTDOCSDIR}/${file}" done for file in `find pub -type d -printf "%p/* "`; do webapp_serverowned "${MY_HTDOCSDIR}/${file}" done webapp_serverowned ${MY_HTDOCSDIR}/data webapp_serverowned ${MY_HTDOCSDIR}/pub # add post-installation instructions webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt # add the reconfigure hook webapp_hook_script ${FILESDIR}/reconfig webapp_src_install } pkg_postinst() { einfo "The first stage of the installation is done. Now you need to setup your virtual hosts via webapp-config" einfo "Please read man webapp-config for a detailed description of the process and some examples" }