]> Pileus Git - ~andy/sunrise/blob - www-apps/davical/davical-0.9.5.2.ebuild
950c2de89677760095f14f70b3b1056c9188a7a6
[~andy/sunrise] / www-apps / davical / davical-0.9.5.2.ebuild
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils git webapp depend.php versionator
6
7 DESCRIPTION="A CalDAV and iCal server"
8 HOMEPAGE="http://rscds.sourceforge.net/"
9 EGIT_REPO_URI="http://repo.or.cz/r/${PN}.git"
10 EGIT_TREE="r${PV}"
11
12 LICENSE="GPL-2"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="doc vhosts"
15 DEPEND="doc? ( dev-php/PEAR-PhpDocumentor )"
16 RDEPEND="www-servers/apache
17         dev-lang/php
18         app-admin/pwgen
19         dev-php/libawl-php
20         dev-perl/yaml
21         dev-perl/DBI
22         dev-perl/DBD-Pg"
23
24 need_php5
25 need_httpd
26
27 pkg_setup() {
28         webapp_pkg_setup
29         require_php_with_use pcre postgres xml
30 }
31
32 src_compile() {
33         if use doc ; then
34                 ebegin "Generating documentation"
35                 phpdoc -c "docs/api/phpdoc.ini"
36                 eend $? || die "Documentation failed to build"
37         fi
38         emake inc/always.php
39         scripts/po/rebuild-translations.sh
40 }
41
42 src_install() {
43         webapp_src_preinst
44
45         local docs="INSTALL README debian/README.debian \
46                 testing/README.regression_tests \
47                 TODO debian/changelog"
48         dodoc-php ${docs} || die "dodoc failed"
49
50         einfo "Installing main files"
51         local dirs="htdocs inc locale"
52         insinto "${MY_HTDOCSDIR}"
53         doins -r ${dirs} || die "doins failed"
54
55         einfo "Installing sql files"
56         insinto "${MY_SQLSCRIPTSDIR}"
57         doins -r dba/* || die "doins failed"
58
59         if use doc ; then
60                 einfo "Installing documentation"
61                 dohtml -r "docs/api/" || die "dohtml failed"
62                 dohtml -r "docs/website/" || die "dohtml failed"
63         fi
64
65         insinto /etc/davical/
66         newins "${FILESDIR}/rscds.conf" calendar.example.com-conf.php
67
68         webapp_postinst_txt en "${FILESDIR}/postinstall-en-0.9.5.txt"
69         webapp_src_install
70 }