# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit webapp eutils DESCRIPTION="web application using PHP and MySQL/pgsql for booking meeting rooms." HOMEPAGE="http://mrbs.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="postgres mysql" DEPEND="" RDEPEND=" virtual/httpd-php mysql? ( dev-db/mysql ) postgres? ( dev-db/postgresql ) " pkg_setup() { webapp_pkg_setup if ! use mysql && ! use pgsql ;then ewarn "You need to specify USE=mysql and/or USE=pgsql" die "You need to specify USE=mysql and/or USE=pgsql" fi } src_install() { webapp_src_preinst # BUG: # no idea how to handle those *.{sql,c,example,php,pl} dodoc * cp ${MY_DOCS} ${D}${MY_HOSTROOTDIR}/${PN} # make it easier to see diff between upgrade cp web/config.inc.php web/config-disto.inc.php # BUG: # naming scheme like *.inc is insecure, should be *.inc.php cp -R web/* ${D}${MY_HTDOCSDIR} webapp_configfile ${MY_HTDOCSDIR}/config.inc.php webapp_configfile ${MY_HTDOCSDIR}/config-disto.inc.php webapp_postinst_txt en README # BUG: # webapp_sqlscript doesn't accept multiple SQL scripts webapp_sqlscript mysql tables.my.sql webapp_sqlscript postgresql tables.pg.sql webapp_src_install }