# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-apache/mod_tcl/mod_tcl-1.0-r1.ebuild,v 1.4 2005/11/01 18:14:44 dertobi123 Exp $ inherit eutils apache-module DESCRIPTION="bittorrent tracker for Apache2 webserver" HOMEPAGE="http://www.crackerjack.net/mod_bt/" SRC_URI="http://www.crackerjack.net/mod_bt/${P}.tgz" LICENSE="Apache-2" KEYWORDS="x86" IUSE="php perl" SLOT="0" DEPEND=">=sys-libs/db-4.2* dev-libs/apr perl? ( dev-lang/perl ) php? ( dev-php/php )" APXS2_S="${S}/src/apache2" APACHE2_MOD_CONF="27_mod_bt" APACHE2_MOD_DEFINE="BITTORRENT" APACHE2_VHOSTFILE="27_mod_bt_vhost" DOCFILES="" need_apache2 src_unpack() { unpack ${A} cd ${S}/src/apache2 epatch ${FILESDIR}/fix_install-${PV}.patch } src_compile() { econf $(use_with php) $(use_with perl) || die "econf failed" emake || die "emake failed" } src_install() { dodir /usr/bin /usr/lib # create directory for php mod_bt extension dodir `php-config --extension-dir 2>/dev/null` make install DESTDIR=${D} prefix=${D}/usr apache2_src_install # directory for tracker data local libdir=/var/lib/mod_bt dodir ${libdir} chown apache:apache ${D}/${libdir} chmod 0750 ${D}/${libdir} }