1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Lightweight CalDAV+CardDAV server"
9 HOMEPAGE="http://baikal-server.com/"
10 SRC_URI="http://baikal-server.com/get/${PN}-regular-${PV}.tgz"
15 REQUIRED_USE="|| ( mysql sqlite )"
17 RDEPEND=">=dev-lang/php-5.3[ctype,filter,pdo,session,xml,mysql?,sqlite?]
18 mysql? ( virtual/mysql )
19 sqlite? ( dev-db/sqlite )
22 S=${WORKDIR}/${PN}-regular
27 dodoc *.md || die "dodoc failed"
29 einfo "Installing web files"
30 insinto "${MY_HTDOCSDIR}"
31 doins -r html/* html/.htaccess Core vendor || die "doins failed"
33 einfo "Setting up container for configuration"
35 doins Specific/.htaccess || die "doins failed"
37 einfo "Fixing symlinks"
39 find "${D}${MY_HTDOCSDIR}" -type l | while read link ; do
40 target=$(readlink "${link}")
41 target=${target/..\/Core/Core}
42 rm "${link}" && ln -s "${target}" "${link}"
44 dosym /etc/${PN} "${MY_HTDOCSDIR}"/Specific
45 dosym . "${MY_HTDOCSDIR}"/html
47 webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt"
50 if has_version www-servers/apache ; then
51 fowners -R apache:apache /etc/${PN}
53 einfo "/etc/${PN} must be owned by the webserver user for baikal"