]> Pileus Git - ~andy/sunrise/blob - www-apps/davical/davical-0.9.9.6.ebuild
dev-php/awl: New version of the awl library
[~andy/sunrise] / www-apps / davical / davical-0.9.9.6.ebuild
1 # Copyright 1999-2011 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-5.3[pcre,pdo,postgres,xml]
20                 >=dev-lang/php-5.3[pdo,postgres,xml] )
21         dev-perl/DBI
22         dev-perl/DBD-Pg
23         dev-perl/yaml
24         >=dev-php/awl-0.48
25         www-servers/apache"
26
27 need_php5
28 need_httpd
29
30 src_prepare() {
31         epatch "${FILESDIR}/awl_location.patch"
32 }
33
34 src_compile() {
35         if use doc ; then
36                 einfo "Generating documentation"
37                 phpdoc -c "docs/api/phpdoc.ini"\
38                         || die "Documentation failed to build"
39         fi
40         emake built-po || die "emake failed"
41 }
42
43 src_install() {
44         webapp_src_preinst
45
46         dodoc-php INSTALL README debian/README.Debian \
47                 testing/README.regression_tests TODO debian/changelog \
48                 || die "dodoc failed"
49
50         einfo "Installing web files"
51         insinto "${MY_HTDOCSDIR}"
52         doins -r htdocs/* htdocs/.htaccess || die "doins failed"
53
54         einfo "Installing main files and i18n"
55         insinto "${MY_HOSTROOTDIR}"
56         doins -r inc locale || die "doins failed"
57         rm -f "${D}/${MY_HOSTROOTDIR}/inc/always.php.in"
58
59         einfo "Installing sql files"
60         insinto "${MY_SQLSCRIPTSDIR}"
61         doins -r dba/* || die "doins failed"
62
63         if use doc ; then
64                 einfo "Installing documentation"
65                 dohtml -r docs/api/ docs/website/ || die "dohtml failed"
66         fi
67
68         insinto /etc/${PN}
69         doins config/* "${FILESDIR}/vhost-example" \
70                 || die "newins failed"
71
72         webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt"
73         webapp_src_install
74
75         fperms +x "${MY_SQLSCRIPTSDIR}/create-database.sh"
76         fperms +x "${MY_SQLSCRIPTSDIR}/update-davical-database"
77 }