--- roundcube_webmail-orig/roundcubemail-0.1.ebuild 2005-10-17 13:54:44.000000000 +0900 +++ roundcube_webmail/roundcube_webmail-0.1.20051007.ebuild 2005-10-17 14:03:38.000000000 +0900 @@ -4,29 +4,36 @@ inherit webapp eutils -MY_P="roundcube_webmail_${PV}-20051007" -DESCRIPTION="Systems on the planet." +# 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/${PN}/${MY_P}.tar.gz" +SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz" LICENSE="GPL-2" KEYWORDS="~x86" -S=${WORKDIR}/${PN} +S=${WORKDIR}/${MY_PN} IUSE="mysql postgresql" RDEPEND=" mysql? (>=dev-db/mysql-4) postgresql? (dev-db/postgresql) - virtual/php - net-www/apache" - + !mysql? ( !postgresql? ( dev-db/postgresql ) ) + virtual/httpd-php +" +# BUG: +# I don't iknow Gentoo's default DB, dev-db/postgresql is just my liking +# *.inc should be *.inc.php src_install () { webapp_src_preinst cd ${S} dodoc CHANGELOG README UPGRADING - pwd cp -R . ${D}/${MY_HTDOCSDIR} local files="config logs program skins temp" @@ -34,8 +41,8 @@ webapp_serverowned "${MY_HTDOCSDIR}/${file}" done webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt - webapp_sqlscript mysql ${MY_HTDOCSDIR}/SQL/mysql.initial.sql - webapp_sqlscript postgres ${MY_HTDOCSDIR}/SQL/postgres.initial.sql + webapp_sqlscript mysql SQL/mysql.initial.sql + 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 @@ -54,7 +61,21 @@ D_USER="roundcube" # do we want to start mysqld? - /etc/init.d/mysql restart || die "mysql needs to be running" + # BUG: + # NO, you shouldn't RESTART database + # you don't need root priv. to create a database + # if an admin is stupid enough to execute SQL without RDBMS running, + # s/he is just asking for troubles + # + # also, i'm not sure this pkg_config is useful + # if you cannot execute a simple SQL script, you shoudn't run RDBMS in the + # first place + # + # what if the remote database listens on a port other than its default? + # how about postgresql? what if the upstream supports addtional database? + # + # what if the upstream change required priv. on the database? + # /etc/init.d/mysql restart || die "mysql needs to be running" echo -n "mysql db name [${D_DB}]: "; read MY_DB [[ -z ${MY_DB} ]] && MY_DB=${D_DB}