# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit webapp eutils depend.php DESCRIPTION="WebCalendar is a PHP-based calendar application" HOMEPAGE="http://webcalendar.sourceforge.net" MY_PN=WebCalendar MY_P=${MY_PN}-${PV} SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" LICENSE="" KEYWORDS="~x86" IUSE="mysql postgres sqlite db2 odbc interbase" DEPEND="${DEPEND} virtual/php sqlite? ( dev-db/sqlite ) mysql? ( >=dev-db/mysql-4 ) postgres? ( dev-db/postgresql ) " S="${WORKDIR}/${MY_P}" pkg_setup () { if ! use postgres && ! use sqlite && ! use mysql && \ ! built_with_use dev-lang/php db2 && \ ! built_with_use dev-lang/php odbc && \ ! built_with_use dev-lang/php interbase ; then eerror "You must select at least one database backend," eerror "using sqlite, mysql or postgres USE flags." eerror "Alternatively recompile dev-land/php with" eerror "odbc, db2 or interbase support" die "no database backend selected" fi webapp_pkg_setup use mysql && require_php_with_use mysql use postgres && require_php_with_use postgres use db2 && require_php_with_use db2 use interbase && require_php_with_use interbase use odbc && require_php_with_use odbc use sqlite && require_php_with_use sqlite } src_install() { webapp_src_preinst cp -R * ${D}/${MY_HTDOCSDIR} dohtml README.html webapp_serverowned ${MY_HTDOCSDIR}/includes webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt webapp_src_install }