# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="1" inherit webapp depend.php DESCRIPTION="DotClear is weblogs management written in PHP with a MySQL backend" HOMEPAGE="http://www.dotclear.net" SRC_URI="http://download.dotclear.net/latest/${P}.tar.gz" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="+mysql postgres +gd" RDEPEND="" S=${WORKDIR}/dotclear need_httpd_cgi need_php_httpd pkg_setup() { webapp_pkg_setup local flags="pcre iconv nls unicode simplexml" use mysql && flags="${flags} mysql" use postgres && flags="${flags} postgres" if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} ; then die "Re-install ${PHP_PKG} with ${flags}" fi if use gd && ! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ; then die "Re-install ${PHP_PKG} with ${flags} and either gd or gd-external" fi } src_install() { webapp_src_preinst local docs="CHANGELOG" dodoc ${docs} insinto "${MY_HTDOCSDIR}" doins -r . # owned files dodir ${MY_HTDOCSDIR}/conf webapp_serverowned ${MY_HTDOCSDIR}/cache webapp_serverowned ${MY_HTDOCSDIR}/public # during installation config.php will be created in this directory webapp_serverowned ${MY_HTDOCSDIR}/inc webapp_serverowned ${MY_HTDOCSDIR}/themes webapp_serverowned ${MY_HTDOCSDIR}/plugins webapp_src_install } pkg_preinst() { prev_instal="false" if has_version ${CATEGORY}/${PN}; then prev_instal="true" fi } pkg_postinst() { webapp_pkg_postinst if ${prev_instal}; then einfo elog "=== Consult update notes ===" einfo ewarn "Please read update instruction." ewarn "See http://doc.dotclear.net/2.0/admin/upgrade" ewarn "or http://doc.dotclear.net/2.0/admin/1-to-2 if" ewarn "you updated from dotclear 1.2.7" einfo fi }