# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit depend.php github-snapshot

DESCRIPTION="A CardDAV interface for Zarafa"
HOMEPAGE="https://github.com/LevelbossMike/Zarafa_Carddav"
SRC_URI="https://download.github.com/LevelbossMike-Zarafa_Carddav-a140752.tar.gz -> ${P}.tar.gz
	http://ftp.disconnected-by-peer.at/pub/${P}.tar.gz"

LICENSE="AGPL-3"
KEYWORDS="~amd64 ~x86"
IUSE=""
SLOT="0"

DEPEND=""
RDEPEND="|| ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 )
	dev-php/PEAR-File_IMC
	dev-php/PEAR-HTTP_WebDAV_Server"

need_php_httpd

src_install() {
	dodoc README.md

	insinto /etc/apache2/modules.d
	newins "${FILESDIR}/60_zarafa-carddav.conf" 60_zarafa-carddav.conf || die "Failed to install apache config files"

	insinto /usr/share/zarafa-webaccess
	doins zarafa_carddav.php
}