wok-stable view eaccelerator/receipt @ rev 5643
Up lguest 2.6.24
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 28 22:15:48 2010 +0200 (2010-05-28) |
parents | 8294794b7a81 |
children | 930b3af4af48 |
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"
13 TAGS="php"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 export PHP_PREFIX="/usr"
20 $PHP_PREFIX/bin/phpize
21 ./configure --enable-eaccelerator=shared \
22 --with-php-config=$PHP_PREFIX/bin/php-config \
23 --prefix=/usr --infodir=/usr/share/info \
24 --mandir=/usr/share/man $CONFIGURE_ARGS &&
25 make &&
26 make INSTALL_ROOT=$PWD/_pkg install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
33 cp $(find $_pkg | grep eaccelerator.so) $fs/usr/share/php/
34 chmod 0777 $fs/tmp/eaccelerator
35 }
37 # Pre and post install commands for Tazpkg.
38 post_install()
39 {
40 grep -q ^extension=msql.so $1/etc/php.ini || \
41 sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=eaccelerator.so\neaccelerator.shm_size="48"\neaccelerator.cache_dir="/tmp/eaccelerator"\neaccelerator.enable="1"\neaccelerator.optimizer="1"\neaccelerator.check_mtime="1"\neaccelerator.debug="0"\neaccelerator.filter=""\neaccelerator.shm_max="0"\neaccelerator.shm_ttl="0"\neaccelerator.shm_prune_period="0"\neaccelerator.shm_only="0"\neaccelerator.compress="1"\neaccelerator.compress_level="9"|' -i $1/etc/php.ini
43 # Start Web server.
44 while read daemon file; do
45 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
46 /etc/init.d/$daemon start
47 fi
48 done <<EOT
49 apache apache/httpd.pid
50 lighttpd lighttpd.pid
51 EOT
52 }
54 # Pre and post remove commands for Tazpkg.
55 pre_remove()
56 {
57 sed -i '/.*eaccelerator.*/d' /etc/php.ini
59 # Start Web server.
60 while read daemon file; do
61 if [ -z "$1" -a -f /etc/init.d/$daemon \
62 -a ! -f "/var/run/$file" ]; then
63 /etc/init.d/$daemon start
64 fi
65 done <<EOT
66 apache apache/httpd.pid
67 lighttpd lighttpd.pid
68 EOT
69 }