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

Contents of /dev-php5/eaccelerator/eaccelerator-0.9.6.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Mar 13 08:10:22 2011 UTC (7 years, 1 month ago) by olemarkus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Moving dev-php5/eaccelerator to dev-php/eaccelerator

1 # Copyright 1999-2011 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.6.1-r1.ebuild,v 1.3 2011/01/04 15:18:20 hwoarang Exp $
4
5 PHP_EXT_NAME="eaccelerator"
6 PHP_EXT_INI="yes"
7 PHP_EXT_ZENDEXT="no"
8
9 EAPI="2"
10
11 [[ -z "${EACCELERATOR_CACHEDIR}" ]] && EACCELERATOR_CACHEDIR="/var/cache/eaccelerator-php5/"
12
13 inherit php-ext-source-r2 eutils depend.apache
14
15 KEYWORDS="amd64 x86"
16
17 DESCRIPTION="A PHP Accelerator & Encoder."
18 HOMEPAGE="http://www.eaccelerator.net/"
19 SRC_URI="http://bart.eaccelerator.net/source/${PV}/${P}.tar.bz2"
20 LICENSE="GPL-2"
21 SLOT="0"
22 IUSE="debug disassembler inode doccommentinclusion session"
23
24 DEPEND="!dev-php5/pecl-apc !dev-php5/xcache"
25 RDEPEND="${DEPEND}
26 >=dev-lang/php-5.1[zlib,session?]
27 virtual/httpd-php
28 "
29
30 # Webserver user and group, here for Apache by default
31 HTTPD_USER="${HTTPD_USER:-apache}"
32 HTTPD_GROUP="${HTTPD_GROUP:-apache}"
33
34 want_apache
35
36 pkg_setup() {
37 depend.apache_pkg_setup
38
39 if ! use apache2 ; then
40 if [[ ${HTTPD_USER} == "apache" ]] || [[ ${HTTPD_GROUP} == "apache" ]] ; then
41 eerror "You did not enable apache2 USE flag, so you need to define"
42 eerror "the user and group that will be used for ${PN} yourself."
43 eerror
44 eerror "This should (generally) match the user and group that your webserver uses, e.g.:"
45 eerror "HTTPD_USER=\"lighttpd\" HTTPD_GROUP=\"lighttpd\" if using www-servers/lighttpd"
46 eerror
47 die "Either enable USE=\"apache2\" or re-emerge this with HTTPD_USER and HTTPD_GROUP set"
48 else
49 enewgroup ${HTTPD_GROUP}
50 enewuser ${HTTPD_USER} -1 -1 /var/www ${HTTPD_GROUP}
51 fi
52 fi
53 }
54
55 src_compile() {
56 my_conf="--enable-eaccelerator=shared --with-eaccelerator-userid=`id -u ${HTTPD_USER}`"
57 use debug && my_conf="${my_conf} --with-eaccelerator-debug"
58 use disassembler && my_conf="${my_conf} --with-eaccelerator-disassembler"
59 ! use inode && my_conf="${my_conf} --without-eaccelerator-use-inode"
60 use doccommentinclusion && my_conf="${my_conf} --with-eaccelerator-doc-comment-inclusion"
61 php-ext-source-r2_src_compile
62 }
63
64 src_install() {
65 php-ext-source-r2_src_install
66
67 keepdir "${EACCELERATOR_CACHEDIR}"
68 fowners ${HTTPD_USER}:${HTTPD_GROUP} "${EACCELERATOR_CACHEDIR}"
69 fperms 750 "${EACCELERATOR_CACHEDIR}"
70
71 insinto "/usr/share/${PVR}"
72 doins -r doc/php/
73 dodoc AUTHORS ChangeLog NEWS README
74
75 php-ext-source-r2_addtoinifiles "eaccelerator.shm_size" '"28"'
76 php-ext-source-r2_addtoinifiles "eaccelerator.cache_dir" "\"${EACCELERATOR_CACHEDIR}\""
77 php-ext-source-r2_addtoinifiles "eaccelerator.enable" '"1"'
78 php-ext-source-r2_addtoinifiles "eaccelerator.optimizer" '"1"'
79 php-ext-source-r2_addtoinifiles "eaccelerator.debug" '"0"'
80 php-ext-source-r2_addtoinifiles ";eaccelerator.log_file" '"/var/log/eaccelerator_log"'
81 php-ext-source-r2_addtoinifiles "eaccelerator.check_mtime" '"1"'
82 php-ext-source-r2_addtoinifiles "eaccelerator.filter" '""'
83 php-ext-source-r2_addtoinifiles "eaccelerator.shm_ttl" '"0"'
84 php-ext-source-r2_addtoinifiles "eaccelerator.shm_prune_period" '"0"'
85 php-ext-source-r2_addtoinifiles "eaccelerator.shm_only" '"0"'
86 php-ext-source-r2_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/${PVR}/ 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