# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit webapp eutils # BUG: # naming rule is insane MY_PV_DATE=${PV/#[[:digit:]].[[:digit:]]./} MY_PV=${PV/%.${MY_PV_DATE}/-${MY_PV_DATE}} MY_P="${PN}_${MY_PV}" MY_PN=${PN/_web/} DESCRIPTION="a browser-based multilingual IMAP client using AJAX" HOMEPAGE="http://www.roundcube.net" SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz" LICENSE="GPL-2" KEYWORDS="~x86" # ${S} is roundcubemail-0.1-20051021 S=${WORKDIR}/${MY_PN}-${MY_PV} IUSE="mysql sqlite" RDEPEND=" mysql? (>=dev-db/mysql-4) sqlite? ( dev-db/sqlite ) !mysql? ( ( !sqlite ( dev-db/mysql ) ) ) virtual/httpd-php " # postgresql? (dev-db/postgresql) # BUG: # I don't know Gentoo's default DB, dev-db/mysql is default # *.inc should be *.inc.php # webapp.eclass doesn't support mysql.update.sql pkg_setup() { webapp_pkg_setup #-------------------------------------------------- # BUG: doesn't work # if use mysql && ! built_with_use virtual/httpd-php mysql ; then # die "USE=mysql emerge php" # fi #-------------------------------------------------- } src_install () { webapp_src_preinst cd ${S} dodoc CHANGELOG README UPGRADING cp -R . ${D}/${MY_HTDOCSDIR} local files="config logs program skins temp" for file in ${files}; do webapp_serverowned "${MY_HTDOCSDIR}/${file}" done # removed from dist #webapp_serverowned ${MY_HTDOCSDIR}/logs/errors #webapp_serverowned ${MY_HTDOCSDIR}/logs/sendmail webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt # BUG: # webapp.eclass doesn't support sqlite # webapp_sqlscript sqlite SQL/sqlite.initial.sql webapp_sqlscript mysql SQL/mysql.initial.sql # removed postgresql support #webapp_sqlscript postgres SQL/postgres.initial.sql webapp_configfile ${MY_HTDOCSDIR}/config/db.inc.php webapp_configfile ${MY_HTDOCSDIR}/config/main.inc.php webapp_src_install } pkg_postinst () { # do something BEFORE webapp_pkg_postinst webapp_pkg_postinst }