# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils webapp depend.php MY_P="cake_${PV/_/-}" # download id changes every release :-( DLID=695 DESCRIPTION="CakePHP is a open source framework for developing Web Applications." HOMEPAGE="http://www.cakephp.org/" SRC_URI="http://cakeforge.org/frs/download.php/${DLID}/${PV}.tar.gz/donation=complete/${PV}.tar.gz" LICENSE="MIT" KEYWORDS="~x86 ~amd64" IUSE="" DEPEND="" RDEPEND="" need_httpd_cgi need_php_httpd pkg_setup() { webapp_pkg_setup require_php_with_use xml pcre session sockets apache2 } src_unpack() { unpack ${A} cd "${S}" ebegin "Removing unnecessary 'empty' files" find cake -type f -name empty -size 0 -delete &> /dev/null eend ebegin "Cleaning up some files" rm -f cake/LICENSE.txt mv cake/VERSION.txt docs/ rm -f cake/console/cake.bat eend } src_install() { webapp_src_preinst dodoc ${MY_P}/docs/* rm -rf ${MY_P}/docs/ insinto "${MY_HTDOCSDIR}" doins -r ${MY_P}/.htaccess ${MY_P}/* webapp_serverowned "${MY_HTDOCSDIR}"/app/tmp/ webapp_serverowned "${MY_HTDOCSDIR}"/app/tmp/cache/ webapp_src_install } pkg_postinst() { elog "For more info, please take a look at the manual at:" elog "http://manual.cakephp.org" elog "------------------------------------------------------" elog "Dont't forget to configure an empty vhost with enabled" elog "mod_rewrite and set up CakePHP using" elog " # webapp-config -I ${PN} ${PV} -h " }