summaryrefslogtreecommitdiff
blob: 1a797812fd7be164da7a210e4e9a9383c7bd2615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit eutils php-lib-r1

DESCRIPTION="Andrew McMillan's web libraries: A collection of generic classes
used by the davical calendar server"
HOMEPAGE="http://andrew.mcmillan.net.nz/projects/awl"
SRC_URI="http://debian.mcmillan.net.nz/packages/awl/awl_${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

DEPEND="dev-lang/php[pcre,postgres,xml]
	doc? ( dev-php/PEAR-PhpDocumentor )"
RDEPEND="${DEPEND}"

need_php5

src_compile() {
	if use doc ; then
		ebegin "Generating documentation"
		phpdoc -c "docs/api/phpdoc.ini"
		eend $? || die "Documentation failed to build"
	fi
}

src_install() {
	local docs="debian/README.Debian debian/changelog"
	dodoc-php ${docs} || die "dodoc failed"

	if use doc ; then
		dohtml -r "docs/api/" || die "dohtml failed"
	fi

	insinto /usr/share/awl
	doins -r dba  || die "doins failed"

	php-lib-r1_src_install ./inc `find ./inc -type f -print | sed -e "s|./inc||g"`
}