# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit webapp MY_P="Zen-Cart-v${PV}" DESCRIPTION="Online e-commerce shopping solution" HOMEPAGE="http://www.zencart.com/" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" 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() { unpack ${A} cd ${S} } src_install() { webapp_src_preinst local docs="INSTALL.TXT LICENSE.TXT docs/*" einfo "Installing main files" cp -r . ${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} for doc in ${docs} INSTALL; do rm -f ${doc} done #config files webapp_serverowned ${MY_HTDOCSDIR}/admin/includes/configure.php webapp_serverowned ${MY_HTDOCSDIR}/includes/configure.php #cache dir webapp_serverowned ${MY_HTDOCSDIR}/cache #image directories for dir in `find ${MY_HTDOCSDIR}/images -type d`; do webapp_serverowned ${dir} done #language includes for dir in `find ${MY_HTDOCSDIR}/includes/languages/english/html_includes -type d`; do webapp_serverowned ${dir} done #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 }