| 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-php4/pecl-apc/pecl-apc-3.0.14.ebuild,v 1.2 2007/07/05 10:55:15 voxus Exp $
|
| 4 |
|
| 5 |
PHP_EXT_NAME="apc"
|
| 6 |
PHP_EXT_PECL_PKG="APC"
|
| 7 |
PHP_EXT_INI="yes"
|
| 8 |
PHP_EXT_ZENDEXT="no"
|
| 9 |
|
| 10 |
inherit php-ext-pecl-r1 confutils
|
| 11 |
|
| 12 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
| 13 |
|
| 14 |
DESCRIPTION="A free, open, and robust framework for caching and optimizing PHP code."
|
| 15 |
LICENSE="PHP"
|
| 16 |
SLOT="0"
|
| 17 |
IUSE="mmap"
|
| 18 |
|
| 19 |
DEPEND="!dev-php4/eaccelerator !dev-php4/xcache"
|
| 20 |
RDEPEND="${DEPEND}"
|
| 21 |
|
| 22 |
need_php_by_category
|
| 23 |
|
| 24 |
pkg_setup() {
|
| 25 |
has_php
|
| 26 |
require_php_sapi_from cgi apache2
|
| 27 |
}
|
| 28 |
|
| 29 |
src_compile() {
|
| 30 |
has_php
|
| 31 |
|
| 32 |
my_conf="--enable-apc"
|
| 33 |
enable_extension_enable "apc-mmap" "mmap" 0
|
| 34 |
enable_extension_with_built_with =${PHP_PKG} apache2 apxs /usr/sbin/apxs2 "optimisation for apache2"
|
| 35 |
|
| 36 |
php-ext-pecl-r1_src_compile
|
| 37 |
}
|
| 38 |
|
| 39 |
src_install() {
|
| 40 |
php-ext-pecl-r1_src_install
|
| 41 |
dodoc-php CHANGELOG INSTALL LICENSE NOTICE
|
| 42 |
|
| 43 |
php-ext-base-r1_addtoinifiles "apc.enabled" '"1"'
|
| 44 |
php-ext-base-r1_addtoinifiles "apc.shm_segments" '"1"'
|
| 45 |
php-ext-base-r1_addtoinifiles "apc.shm_size" '"30"'
|
| 46 |
php-ext-base-r1_addtoinifiles "apc.optimization" '"0"'
|
| 47 |
php-ext-base-r1_addtoinifiles "apc.num_files_hint" '"1024"'
|
| 48 |
php-ext-base-r1_addtoinifiles "apc.ttl" '"7200"'
|
| 49 |
php-ext-base-r1_addtoinifiles "apc.user_ttl" '"7200"'
|
| 50 |
php-ext-base-r1_addtoinifiles "apc.gc_ttl" '"3600"'
|
| 51 |
php-ext-base-r1_addtoinifiles "apc.cache_by_default" '"1"'
|
| 52 |
php-ext-base-r1_addtoinifiles ";apc.mmap_file_mask" '"/tmp/apcphp4.XXXXXX"'
|
| 53 |
php-ext-base-r1_addtoinifiles "apc.file_update_protection" '"2"'
|
| 54 |
php-ext-base-r1_addtoinifiles "apc.enable_cli" '"0"'
|
| 55 |
php-ext-base-r1_addtoinifiles "apc.max_file_size" '"1M"'
|
| 56 |
php-ext-base-r1_addtoinifiles "apc.stat" '"1"'
|
| 57 |
php-ext-base-r1_addtoinifiles "apc.write_lock" '"1"'
|
| 58 |
|
| 59 |
dodir "${PHP_EXT_SHARED_DIR}"
|
| 60 |
insinto "${PHP_EXT_SHARED_DIR}"
|
| 61 |
doins apc.php
|
| 62 |
}
|
| 63 |
|
| 64 |
pkg_postinst() {
|
| 65 |
elog "The apc.php file shipped with this release of PECL-APC was"
|
| 66 |
elog "installed into ${ROOT}usr/share/php4/apc/."
|
| 67 |
}
|