summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/cake/cake-1.2.0.6311.ebuild')
-rw-r--r--www-apps/cake/cake-1.2.0.6311.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/www-apps/cake/cake-1.2.0.6311.ebuild b/www-apps/cake/cake-1.2.0.6311.ebuild
new file mode 100644
index 0000000..bb16c99
--- /dev/null
+++ b/www-apps/cake/cake-1.2.0.6311.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit webapp depend.php
+
+DESCRIPTION="A rapid development framework for PHP"
+HOMEPAGE="http://cakephp.org/"
+
+# Ugly hack until the source is provided w/o going through the donation
+# interstitial and to handle the underscore...
+MY_P="${PN}_${PV}"
+DLID="595"
+SRC_URI="http://cakeforge.org/frs/download.php/${DLID}/${MY_P}.tar.bz2/donation=complete/${MY_P}.tar.bz2"
+
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86"
+IUSE="adodb"
+
+RDEPEND="virtual/httpd-cgi
+ adodb? ( dev-php/adodb )"
+
+need_php_httpd
+
+S="${WORKDIR}/${MY_P}-beta"
+
+pkg_setup () {
+ webapp_pkg_setup
+
+ local flags="xml session"
+ local dbflags="mysql postgres sqlite"
+ if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} || \
+ ( ! use adodb && ! PHPCHECKNODIE="yes" require_php_with_any_use ${dbflags} ) ; then
+ die "Re-install ${PHP_PKG} with ${flags} and at least one of ${dbflags} USE flags enabled."
+ elif
+ use adodb && ! PHPCHECKNODIE="yes" require_php_with_any_use ${dbflags} ; then
+ ewarn
+ ewarn "Assuming you are going to use ADOdb wrapper for database backend."
+ ewarn "You are on you own with this. Unless you know what you are doing,"
+ ewarn "you should re-emerge ${PHP_PKG} with at least one of"
+ ewarn "${dbflags} USE flags enabled."
+ else
+ einfo "All PHP checks passed, continue..."
+ fi
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc docs/*
+ rm -rf docs/
+
+ cp app/config/database.php.default app/config/database.php
+ cp -r . "${D}"/${MY_HTDOCSDIR}
+
+ webapp_serverowned -R "${MY_HTDOCSDIR}"/app/tmp
+ for i in app/config/*.php ; do
+ webapp_configfile ${MY_HTDOCSDIR}/${i}
+ done
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+ webapp_src_install
+}