wok-6.x diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/eaccelerator/receipt Sat Nov 22 23:27:11 2008 +0000 1.3 @@ -0,0 +1,67 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="eaccelerator" 1.7 +VERSION="0.9.5.3" 1.8 +CATEGORY="system-tools" 1.9 +SHORT_DESC="PHP accelerator, optimizer, and dynamic content cache." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.12 +WEB_SITE="http://eaccelerator.net/" 1.13 +WGET_URL="http://bart.eaccelerator.net/source/$VERSION/$TARBALL" 1.14 +DEPENDS="php m4" 1.15 +BUILD_DEPENDS="php-dev" 1.16 + 1.17 +# Rules to configure and make the package. 1.18 +compile_rules() 1.19 +{ 1.20 + cd $src 1.21 + export PHP_PREFIX="/usr" 1.22 + $PHP_PREFIX/bin/phpize 1.23 + ./configure --enable-eaccelerator=shared \ 1.24 + --with-php-config=$PHP_PREFIX/bin/php-config \ 1.25 + --prefix=/usr --infodir=/usr/share/info \ 1.26 + --mandir=/usr/share/man $CONFIGURE_ARGS && 1.27 + make && 1.28 + make INSTALL_ROOT=$PWD/_pkg install 1.29 +} 1.30 + 1.31 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.32 +genpkg_rules() 1.33 +{ 1.34 + mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php 1.35 + cp $(find $_pkg | grep eaccelerator.so) $fs/usr/share/php/ 1.36 + chmod 0777 $fs/tmp/eaccelerator 1.37 +} 1.38 + 1.39 +# Pre and post install commands for Tazpkg. 1.40 +post_install() 1.41 +{ 1.42 + grep -q ^extension=msql.so $1/etc/php.ini || \ 1.43 + sed -e 's|;.*extension=msql.so|; extension=msql.so\n\ 1.44 + extension=eaccelerator.so\n\ 1.45 + eaccelerator.shm_size="48"\n\ 1.46 + eaccelerator.cache_dir="/tmp/eaccelerator"\n\ 1.47 + eaccelerator.enable="1"\n\ 1.48 + eaccelerator.optimizer="1"\n\ 1.49 + eaccelerator.check_mtime="1"\n\ 1.50 + eaccelerator.debug="0"\n\ 1.51 + eaccelerator.filter=""\n\ 1.52 + eaccelerator.shm_max="0"\n\ 1.53 + eaccelerator.shm_ttl="0"\n\ 1.54 + eaccelerator.shm_prune_period="0"\n\ 1.55 + eaccelerator.shm_only="0"\n\ 1.56 + eaccelerator.compress="1"\n\ 1.57 + eaccelerator.compress_level="9"|' -i $1/etc/php.ini 1.58 + 1.59 + # Start Web server. 1.60 + while read daemon file; do 1.61 + if [ -z "$1" -a -f /etc/init.d/$daemon \ 1.62 + -a ! -f "/var/run/$file" ]; then 1.63 + /etc/init.d/$daemon start 1.64 + fi 1.65 + done <<EOT 1.66 +apache apache/httpd.pid 1.67 +lighttpd lighttpd.pid 1.68 +EOT 1.69 +} 1.70 +