]> Pileus Git - ~andy/sunrise/blob - www-apps/davical/davical-0.9.9.ebuild
011fba159166ee3bcc116e3eba99dd783fef17cc
[~andy/sunrise] / www-apps / davical / davical-0.9.9.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6
7 inherit depend.php webapp
8
9 DESCRIPTION="A CalDAV and iCal server"
10 HOMEPAGE="http://davical.org/"
11 SRC_URI="http://debian.mcmillan.net.nz/packages/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="doc"
16
17 DEPEND="doc? ( dev-php/PEAR-PhpDocumentor )"
18 RDEPEND="app-admin/pwgen
19         dev-lang/php[pcre,pdo,postgres,xml]
20         dev-perl/DBI
21         dev-perl/DBD-Pg
22         dev-perl/yaml
23         >=dev-php/awl-0.43
24         www-servers/apache"
25
26 need_php5
27 need_httpd
28
29 src_compile() {
30         if use doc ; then
31                 einfo "Generating documentation"
32                 phpdoc -c "docs/api/phpdoc.ini"\
33                         || die "Documentation failed to build"
34         fi
35         emake built-po || die "emake failed"
36 }
37
38 src_install() {
39         webapp_src_preinst
40
41         dodoc-php INSTALL README debian/README.Debian \
42                 testing/README.regression_tests TODO debian/changelog \
43                 || die "dodoc failed"
44
45         einfo "Installing web files"
46         insinto "${MY_HTDOCSDIR}"
47         doins -r htdocs/* htdocs/.htaccess || die "doins failed"
48
49         einfo "Installing main files and i18n"
50         insinto "${MY_HOSTROOTDIR}"
51         doins -r inc locale || die "doins failed"
52         rm -f "${D}/${MY_HOSTROOTDIR}/inc/always.php.in"
53
54         einfo "Installing sql files"
55         insinto "${MY_SQLSCRIPTSDIR}"
56         doins -r dba/* || die "doins failed"
57
58         if use doc ; then
59                 einfo "Installing documentation"
60                 dohtml -r docs/api/ docs/website/ || die "dohtml failed"
61         fi
62
63         insinto /etc/${PN}
64         doins config/* "${FILESDIR}/vhost-example" \
65                 || die "newins failed"
66
67         webapp_postinst_txt en "${FILESDIR}/postinstall-en-${PV}.txt"
68         webapp_src_install
69
70         fperms +x "${MY_SQLSCRIPTSDIR}/create-database.sh"
71         fperms +x "${MY_SQLSCRIPTSDIR}/update-davical-database"
72 }