wok-6.x view eaccelerator/receipt @ rev 1746

Add eaccelerator
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 22 23:27:11 2008 +0000 (2008-11-22)
parents
children 8294794b7a81
line source
1 # SliTaz package receipt.
3 PACKAGE="eaccelerator"
4 VERSION="0.9.5.3"
5 CATEGORY="system-tools"
6 SHORT_DESC="PHP accelerator, optimizer, and dynamic content cache."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://eaccelerator.net/"
10 WGET_URL="http://bart.eaccelerator.net/source/$VERSION/$TARBALL"
11 DEPENDS="php m4"
12 BUILD_DEPENDS="php-dev"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 export PHP_PREFIX="/usr"
19 $PHP_PREFIX/bin/phpize
20 ./configure --enable-eaccelerator=shared \
21 --with-php-config=$PHP_PREFIX/bin/php-config \
22 --prefix=/usr --infodir=/usr/share/info \
23 --mandir=/usr/share/man $CONFIGURE_ARGS &&
24 make &&
25 make INSTALL_ROOT=$PWD/_pkg install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
32 cp $(find $_pkg | grep eaccelerator.so) $fs/usr/share/php/
33 chmod 0777 $fs/tmp/eaccelerator
34 }
36 # Pre and post install commands for Tazpkg.
37 post_install()
38 {
39 grep -q ^extension=msql.so $1/etc/php.ini || \
40 sed -e 's|;.*extension=msql.so|; extension=msql.so\n\
41 extension=eaccelerator.so\n\
42 eaccelerator.shm_size="48"\n\
43 eaccelerator.cache_dir="/tmp/eaccelerator"\n\
44 eaccelerator.enable="1"\n\
45 eaccelerator.optimizer="1"\n\
46 eaccelerator.check_mtime="1"\n\
47 eaccelerator.debug="0"\n\
48 eaccelerator.filter=""\n\
49 eaccelerator.shm_max="0"\n\
50 eaccelerator.shm_ttl="0"\n\
51 eaccelerator.shm_prune_period="0"\n\
52 eaccelerator.shm_only="0"\n\
53 eaccelerator.compress="1"\n\
54 eaccelerator.compress_level="9"|' -i $1/etc/php.ini
56 # Start Web server.
57 while read daemon file; do
58 if [ -z "$1" -a -f /etc/init.d/$daemon \
59 -a ! -f "/var/run/$file" ]; then
60 /etc/init.d/$daemon start
61 fi
62 done <<EOT
63 apache apache/httpd.pid
64 lighttpd lighttpd.pid
65 EOT
66 }