# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit webapp MY_P="zen-cart-v1.2.6d" DESCRIPTION="Online e-commerce shopping solution" HOMEPAGE="http://www.zencart.com/" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip" RESTRICT="nomirror" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="phpbb" RDEPEND="virtual/php dev-db/mysql net-www/apache" DEPEND="phpbb? ( www-apps/phpBB )" S="${WORKDIR}" src_unpack() { einfo einfo "Please make sure that your PHP is compiled with GD and MySQL support" einfo unpack ${A} cd ${S} } src_install() { webapp_src_preinst local docs="./${MY_P}-full-release/docs/* ./${MY_P}-full-release/INSTALL.TXT ./${MY_P}-full-release/LICENSE.TXT" einfo "Installing main files" cp -r ./${MY_P}-full-release/* ${D}${MY_HTDOCSDIR} einfo "Creating default config files" cp ${D}${MY_HTDOCSDIR}/admin/includes/dist-configure.php ${D}${MY_HTDOCSDIR}/admin/includes/configure.php cp ${D}${MY_HTDOCSDIR}/includes/dist-configure.php ${D}${MY_HTDOCSDIR}/includes/configure.php einfo "Installing documentation" dodoc ${docs} #delete does not yet work (->path!) for doc in ${docs}; do rm -f ${doc} done #config files webapp_serverowned ${MY_HTDOCSDIR}/admin/includes/configure.php webapp_serverowned ${MY_HTDOCSDIR}/includes/configure.php #Identify the configuration files that this app uses webapp_configfile ${MY_HTDOCSDIR}/admin/includes/configure.php webapp_configfile ${MY_HTDOCSDIR}/includes/configure.php #cache dir webapp_serverowned ${MY_HTDOCSDIR}/cache #image directories cd ${MY_P}-full-release for dirs in `find ./images -type d`; do webapp_serverowned ${MY_HTDOCSDIR}/${dirs} done #language includes for dirs in `find ./includes/languages/english/html_includes -type d`; do webapp_serverowned ${MY_HTDOCSDIR}/${dirs} done cd .. #misc dirs webapp_serverowned ${MY_HTDOCSDIR}/pub webapp_serverowned ${MY_HTDOCSDIR}/admin/backups webapp_serverowned ${MY_HTDOCSDIR}/admin/images/graphs webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt webapp_src_install }