blob: b0a4c5d3ce78dde3bec4cd8aa094567fb2544792 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 1999-2007 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="549"
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}
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}/app/config/${i}
done
webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
webapp_src_install
}
|