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