/[gentoo-x86]/dev-php5/eaccelerator/eaccelerator-0.9.5.ebuild
Gentoo

Contents of /dev-php5/eaccelerator/eaccelerator-0.9.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat May 12 14:28:32 2007 UTC (10 years, 5 months ago) by chtekk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Fix require_php_sapi_from usage wrt apache1.
(Portage version: 2.1.2.7)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-php5/eaccelerator/eaccelerator-0.9.5.ebuild,v 1.9 2007/03/06 15:21:38 chtekk Exp $
4
5 PHP_EXT_NAME="eaccelerator"
6 PHP_EXT_INI="yes"
7 PHP_EXT_ZENDEXT="yes"
8
9 [[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/"
10
11 inherit php-ext-source-r1
12
13 KEYWORDS="~amd64 ~sparc ~x86"
14
15 DESCRIPTION="A PHP Accelerator & Encoder."
16 HOMEPAGE="http://www.eaccelerator.net/"
17 SRC_URI="mirror://sourceforge/eaccelerator/${P}.tar.bz2"
18 LICENSE="GPL-2"
19 SLOT="0"
20 IUSE="contentcache debug disassembler inode session sharedmem"
21
22 DEPEND="!dev-php5/pecl-apc !dev-php5/xcache"
23 RDEPEND="${DEPEND}"
24
25 # Webserver user and group, here for Apache.
26 HTTPD_USER="apache"
27 HTTPD_GROUP="apache"
28
29 need_php_by_category
30
31 pkg_setup() {
32 has_php
33
34 require_php_sapi_from cgi apache apache2
35
36 if use session ; then
37 require_php_with_use session zlib
38 else
39 require_php_with_use zlib
40 fi
41 }
42
43 src_compile() {
44 has_php
45
46 my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`"
47
48 use contentcache && my_conf="${my_conf} --with-eaccelerator-content-caching"
49 use debug && my_conf="${my_conf} --with-eaccelerator-debug"
50 use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler"
51 ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode"
52 use session && my_conf="${my_conf} --with-eaccelerator-sessions"
53 use sharedmem && my_conf="${my_conf} --with-eaccelerator-shared-memory"
54
55 php-ext-source-r1_src_compile
56 }
57
58 src_install() {
59 php-ext-source-r1_src_install
60
61 keepdir "${EACCELERATOR_CACHEDIR}"
62 fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}"
63 fperms 750 "${EACCELERATOR_CACHEDIR}"
64
65 insinto "/usr/share/${PN}-php5/"
66 doins -r doc/php/
67 dodoc-php AUTHORS ChangeLog COPYING NEWS README README.eLoader
68
69 php-ext-base-r1_addtoinifiles "eaccelerator.shm_size" '"28"'
70 php-ext-base-r1_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\""
71 php-ext-base-r1_addtoinifiles "eaccelerator.enable" '"1"'
72 php-ext-base-r1_addtoinifiles "eaccelerator.optimizer" '"1"'
73 php-ext-base-r1_addtoinifiles "eaccelerator.debug" '"0"'
74 php-ext-base-r1_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"'
75 php-ext-base-r1_addtoinifiles "eaccelerator.check_mtime" '"1"'
76 php-ext-base-r1_addtoinifiles "eaccelerator.filter" '""'
77 php-ext-base-r1_addtoinifiles "eaccelerator.shm_max" '"0"'
78 php-ext-base-r1_addtoinifiles "eaccelerator.shm_ttl" '"0"'
79 php-ext-base-r1_addtoinifiles "eaccelerator.shm_prune_period" '"0"'
80 php-ext-base-r1_addtoinifiles "eaccelerator.shm_only" '"0"'
81 php-ext-base-r1_addtoinifiles "eaccelerator.compress" '"1"'
82 php-ext-base-r1_addtoinifiles "eaccelerator.compress_level" '"9"'
83 php-ext-base-r1_addtoinifiles "eaccelerator.keys" '"shm_and_disk"'
84 php-ext-base-r1_addtoinifiles "eaccelerator.sessions" '"shm_and_disk"'
85 php-ext-base-r1_addtoinifiles "eaccelerator.content" '"shm_and_disk"'
86 php-ext-base-r1_addtoinifiles ";eaccelerator.allowed_admin_path" '"/path/where/admin/files/shall/be/allowed"'
87 }
88
89 pkg_postinst() {
90 elog "Please see the files in ${ROOT}usr/share/${PN}-php5/ for some"
91 elog "examples and informations on how to use the functions that"
92 elog "eAccelerator adds to PHP."
93 }

  ViewVC Help
Powered by ViewVC 1.1.20